diff --git a/SPMeta2.sln b/SPMeta2.sln index cec2eae20..638b601fd 100644 --- a/SPMeta2.sln +++ b/SPMeta2.sln @@ -123,6 +123,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPMeta2.Nintex.SSOM", "SPMe EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Regression", "SPMeta2\Regression\Regression.csproj", "{593FFE45-EFCC-43DC-8AA2-27236DD6160D}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPMeta2.Containers.FarmSolutionWebAppContainer", "SPMeta2\SPMeta2.Containers.FarmSolutionWebAppContainer\SPMeta2.Containers.FarmSolutionWebAppContainer.csproj", "{9A306EC6-DE61-49B9-940D-7C1A36FC15AD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPMeta2.Containers.FarmSolutionWebAppContainer1", "SPMeta2\SPMeta2.Containers.FarmSolutionWebAppContainer1\SPMeta2.Containers.FarmSolutionWebAppContainer1.csproj", "{B9DDD9D7-99AF-4849-A559-C02558D4F774}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -386,6 +390,30 @@ Global {593FFE45-EFCC-43DC-8AA2-27236DD6160D}.Debug45|Any CPU.Build.0 = Debug|Any CPU {593FFE45-EFCC-43DC-8AA2-27236DD6160D}.Release|Any CPU.ActiveCfg = Release|Any CPU {593FFE45-EFCC-43DC-8AA2-27236DD6160D}.Release|Any CPU.Build.0 = Release|Any CPU + {9A306EC6-DE61-49B9-940D-7C1A36FC15AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A306EC6-DE61-49B9-940D-7C1A36FC15AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A306EC6-DE61-49B9-940D-7C1A36FC15AD}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {9A306EC6-DE61-49B9-940D-7C1A36FC15AD}.Debug40|Any CPU.ActiveCfg = Debug|Any CPU + {9A306EC6-DE61-49B9-940D-7C1A36FC15AD}.Debug40|Any CPU.Build.0 = Debug|Any CPU + {9A306EC6-DE61-49B9-940D-7C1A36FC15AD}.Debug40|Any CPU.Deploy.0 = Debug|Any CPU + {9A306EC6-DE61-49B9-940D-7C1A36FC15AD}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU + {9A306EC6-DE61-49B9-940D-7C1A36FC15AD}.Debug45|Any CPU.Build.0 = Debug|Any CPU + {9A306EC6-DE61-49B9-940D-7C1A36FC15AD}.Debug45|Any CPU.Deploy.0 = Debug|Any CPU + {9A306EC6-DE61-49B9-940D-7C1A36FC15AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A306EC6-DE61-49B9-940D-7C1A36FC15AD}.Release|Any CPU.Build.0 = Release|Any CPU + {9A306EC6-DE61-49B9-940D-7C1A36FC15AD}.Release|Any CPU.Deploy.0 = Release|Any CPU + {B9DDD9D7-99AF-4849-A559-C02558D4F774}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9DDD9D7-99AF-4849-A559-C02558D4F774}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9DDD9D7-99AF-4849-A559-C02558D4F774}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {B9DDD9D7-99AF-4849-A559-C02558D4F774}.Debug40|Any CPU.ActiveCfg = Debug|Any CPU + {B9DDD9D7-99AF-4849-A559-C02558D4F774}.Debug40|Any CPU.Build.0 = Debug|Any CPU + {B9DDD9D7-99AF-4849-A559-C02558D4F774}.Debug40|Any CPU.Deploy.0 = Debug|Any CPU + {B9DDD9D7-99AF-4849-A559-C02558D4F774}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU + {B9DDD9D7-99AF-4849-A559-C02558D4F774}.Debug45|Any CPU.Build.0 = Debug|Any CPU + {B9DDD9D7-99AF-4849-A559-C02558D4F774}.Debug45|Any CPU.Deploy.0 = Debug|Any CPU + {B9DDD9D7-99AF-4849-A559-C02558D4F774}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9DDD9D7-99AF-4849-A559-C02558D4F774}.Release|Any CPU.Build.0 = Release|Any CPU + {B9DDD9D7-99AF-4849-A559-C02558D4F774}.Release|Any CPU.Deploy.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -432,5 +460,7 @@ Global {588FC30F-1C85-410E-AB20-C9741DB28857} = {543E02CC-AA4A-4B1F-ABBD-2C88CFAA463C} {788D7D6E-5347-4D09-BFF8-E83AD7CA1FD3} = {543E02CC-AA4A-4B1F-ABBD-2C88CFAA463C} {593FFE45-EFCC-43DC-8AA2-27236DD6160D} = {EE9BD842-2CA9-45B2-AB7C-A8EB0353AAB7} + {9A306EC6-DE61-49B9-940D-7C1A36FC15AD} = {358E83EE-8ABA-463E-A868-3906865FDA39} + {B9DDD9D7-99AF-4849-A559-C02558D4F774} = {358E83EE-8ABA-463E-A868-3906865FDA39} EndGlobalSection EndGlobal diff --git a/SPMeta2/Build/build.json b/SPMeta2/Build/build.json index 5cf940e86..c904f67b9 100644 --- a/SPMeta2/Build/build.json +++ b/SPMeta2/Build/build.json @@ -284,7 +284,7 @@ { "CustomProjectFolder" : "SPMeta2/SPMeta2", "Id": "SPMeta2.Core", - "Version": "1.2.120", + "Version": "1.2.130-beta1", "Dependencies": [ ], "LicenseUrl": "http://docs.subpointsolutions.com/spmeta2/license", "ProjectUrl": "https://github.com/SubPointSolutions/spmeta2", @@ -323,11 +323,11 @@ { "CustomProjectFolder" : "SPMeta2/SPMeta2.Standard", "Id": "SPMeta2.Core.Standard", - "Version": "1.2.120", + "Version": "1.2.130-beta1", "Dependencies": [ { "Id": "SPMeta2.Core", - "Version": "1.2.120" + "Version": "1.2.130-beta1" } ], "LicenseUrl": "http://docs.subpointsolutions.com/spmeta2/license", @@ -368,11 +368,11 @@ { "CustomProjectFolder" : "SPMeta2/SPMeta2.CSOM", "Id": "SPMeta2.CSOM.Foundation", - "Version": "1.2.120", + "Version": "1.2.130-beta1", "Dependencies": [ { "Id": "SPMeta2.Core", - "Version": "1.2.120" + "Version": "1.2.130-beta1" } ], "LicenseUrl": "http://docs.subpointsolutions.com/spmeta2/license", @@ -405,15 +405,15 @@ { "CustomProjectFolder" : "SPMeta2/SPMeta2.CSOM.Standard", "Id": "SPMeta2.CSOM.Standard", - "Version": "1.2.120", + "Version": "1.2.130-beta1", "Dependencies": [ { "Id": "SPMeta2.CSOM.Foundation", - "Version": "1.2.120" + "Version": "1.2.130-beta1" }, { "Id": "SPMeta2.Core.Standard", - "Version": "1.2.120" + "Version": "1.2.130-beta1" } ], "LicenseUrl": "http://docs.subpointsolutions.com/spmeta2/license", @@ -446,11 +446,11 @@ { "CustomProjectFolder" : "SPMeta2/SPMeta2.SSOM", "Id": "SPMeta2.SSOM.Foundation", - "Version": "1.2.120", + "Version": "1.2.130-beta1", "Dependencies": [ { "Id": "SPMeta2.Core", - "Version": "1.2.120" + "Version": "1.2.130-beta1" } ], "LicenseUrl": "http://docs.subpointsolutions.com/spmeta2/license", @@ -483,15 +483,15 @@ { "CustomProjectFolder" : "SPMeta2/SPMeta2.SSOM.Standard", "Id": "SPMeta2.SSOM.Standard", - "Version": "1.2.120", + "Version": "1.2.130-beta1", "Dependencies": [ { "Id": "SPMeta2.SSOM.Foundation", - "Version": "1.2.120" + "Version": "1.2.130-beta1" }, { "Id": "SPMeta2.Core.Standard", - "Version": "1.2.120" + "Version": "1.2.130-beta1" } ], "LicenseUrl": "http://docs.subpointsolutions.com/spmeta2/license", @@ -525,11 +525,11 @@ { "CustomProjectFolder" : "SPMeta2/SPMeta2.CSOM", "Id": "SPMeta2.CSOM.Foundation-v14", - "Version": "1.2.120", + "Version": "1.2.130-beta1", "Dependencies": [ { "Id": "SPMeta2.Core", - "Version": "1.2.120" + "Version": "1.2.130-beta1" } ], "LicenseUrl": "http://docs.subpointsolutions.com/spmeta2/license", @@ -555,15 +555,15 @@ { "CustomProjectFolder" : "SPMeta2/SPMeta2.CSOM.Standard", "Id": "SPMeta2.CSOM.Standard-v14", - "Version": "1.2.120", + "Version": "1.2.130-beta1", "Dependencies": [ { "Id": "SPMeta2.CSOM.Foundation-v14", - "Version": "1.2.120" + "Version": "1.2.130-beta1" }, { "Id": "SPMeta2.Core.Standard", - "Version": "1.2.120" + "Version": "1.2.130-beta1" } ], "LicenseUrl": "http://docs.subpointsolutions.com/spmeta2/license", @@ -589,11 +589,11 @@ { "CustomProjectFolder" : "SPMeta2/SPMeta2.SSOM", "Id": "SPMeta2.SSOM.Foundation-v14", - "Version": "1.2.120", + "Version": "1.2.130-beta1", "Dependencies": [ { "Id": "SPMeta2.Core", - "Version": "1.2.120" + "Version": "1.2.130-beta1" } ], "LicenseUrl": "http://docs.subpointsolutions.com/spmeta2/license", @@ -619,15 +619,15 @@ { "CustomProjectFolder" : "SPMeta2/SPMeta2.SSOM.Standard", "Id": "SPMeta2.SSOM.Standard-v14", - "Version": "1.2.120", + "Version": "1.2.130-beta1", "Dependencies": [ { "Id": "SPMeta2.SSOM.Foundation-v14", - "Version": "1.2.120" + "Version": "1.2.130-beta1" }, { "Id": "SPMeta2.Core.Standard", - "Version": "1.2.120" + "Version": "1.2.130-beta1" } ], "LicenseUrl": "http://docs.subpointsolutions.com/spmeta2/license", @@ -653,11 +653,11 @@ { "CustomProjectFolder" : "SPMeta2/SPMeta2.CSOM", "Id": "SPMeta2.CSOM.Foundation-v16", - "Version": "1.2.120", + "Version": "1.2.130-beta1", "Dependencies": [ { "Id": "SPMeta2.Core", - "Version": "1.2.120" + "Version": "1.2.130-beta1" }, { "Id": "Microsoft.SharePointOnline.CSOM", @@ -694,15 +694,15 @@ { "CustomProjectFolder" : "SPMeta2/SPMeta2.CSOM.Standard", "Id": "SPMeta2.CSOM.Standard-v16", - "Version": "1.2.120", + "Version": "1.2.130-beta1", "Dependencies": [ { "Id": "SPMeta2.CSOM.Foundation-v16", - "Version": "1.2.120" + "Version": "1.2.130-beta1" }, { "Id": "SPMeta2.Core.Standard", - "Version": "1.2.120" + "Version": "1.2.130-beta1" }, { "Id": "Microsoft.SharePointOnline.CSOM", diff --git a/SPMeta2/Regression/_ut_grid_baseline_config.ps1 b/SPMeta2/Regression/_ut_grid_baseline_config.ps1 index 3015fa376..3d64e799f 100644 --- a/SPMeta2/Regression/_ut_grid_baseline_config.ps1 +++ b/SPMeta2/Regression/_ut_grid_baseline_config.ps1 @@ -57,7 +57,19 @@ $configScript = { $s.Configuration.Alter() } - function Ensure-AssociatedGroups() { + function Ensure-AssociatedGroups-ForAllSites() { + + Add-PSSnapin Microsoft.SharePoint.PowerShell + $sites = Get-SPSite + + foreach($site in $sites) + { + Write-Host "Ensuring associated security group on site:[$($site.Url)]" + Ensure-AssociatedGroups $site.Url + } + } + + function Ensure-AssociatedGroups($url) { Add-PSSnapin Microsoft.SharePoint.PowerShell @@ -66,7 +78,7 @@ $configScript = { # TODO - $web = Get-SPWeb ("http://" + $computerName + ":31449") + $web = Get-SPWeb ($url) if ($web.AssociatedVisitorGroup -eq $null) { Write-Host 'The Visitor Group does not exist. It will be created...' -ForegroundColor DarkYellow $currentLogin = $web.CurrentUser.LoginName @@ -127,9 +139,8 @@ $configScript = { $computerName = [environment]::MachineName Write-Host "Runing on [$computerName]" - #return - Ensure-AssociatedGroups + Ensure-AssociatedGroups-ForAllSites Update-SharePoint-ULS Limit-SharePoint-Search diff --git a/SPMeta2/Regression/_ut_grid_dsc_spmeta2_webapp_unittests.ps1 b/SPMeta2/Regression/_ut_grid_dsc_spmeta2_webapp_unittests.ps1 index 22d0001ee..c63bc1104 100644 --- a/SPMeta2/Regression/_ut_grid_dsc_spmeta2_webapp_unittests.ps1 +++ b/SPMeta2/Regression/_ut_grid_dsc_spmeta2_webapp_unittests.ps1 @@ -122,7 +122,18 @@ Configuration SPMeta2_UnitTestSettings if($onprem -eq $true) { - $siteUrl = $webApp_Url.TrimEnd('/') + $config.SiteCollectionUrls + $siteUrl = $config.SiteCollectionUrls + + if( ($siteUrl -is [System.Object[]]) -eq $true) + { + $siteUrl = $siteUrl[0] + } + + if($siteUrl.StartsWith("http") -eq $false) + { + $siteUrl = $webApp_Url.TrimEnd('/') + $siteUrl + } + Write-Host "Fetching default taxoomy store for SharePoint:[$siteUrl]" -fore Green $o365_UserName = $config.OnlineUserName @@ -303,9 +314,6 @@ $config = @{ ) } -#$dsc_nodeNames = @("dev13") - - <# Apply-Dsc-Configuration -name SPMeta2_UnitTestSettings_Clean ` -nodeNames $dsc_nodeNames ` @@ -316,4 +324,4 @@ Apply-Dsc-Configuration -name SPMeta2_UnitTestSettings_Clean ` Apply-Dsc-Configuration -name SPMeta2_UnitTestSettings ` -nodeNames $dsc_nodeNames ` -isVerbose $true ` - -config $config + -config $config \ No newline at end of file diff --git a/SPMeta2/SPMeta2.Build/m2.buildbaseline.xml b/SPMeta2/SPMeta2.Build/m2.buildbaseline.xml index 901cabf4d..409982d94 100644 --- a/SPMeta2/SPMeta2.Build/m2.buildbaseline.xml +++ b/SPMeta2/SPMeta2.Build/m2.buildbaseline.xml @@ -1 +1 @@ -SPMeta2.dllSPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.AlternateUrlDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.AnonymousAccessSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SharePointDesignerSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DeveloperDashboardSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.AppDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.AuditSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ClearRecycleBinDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ListItemDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ComposedLookItemDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ComposedLookItemLinkDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentDatabaseDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DeleteQuickLaunchNavigationNodesDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DeleteWebPartsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DiscussionReplyItemDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.FieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.LookupFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.DependentLookupFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DocumentParserDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.MultiChoiceFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.ChoiceFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.OutcomeChoiceFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.GeolocationFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DiscussionItemDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ListItemFieldValuesDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.HtmlMasterPageDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.MasterPagePreviewDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.MasterPageDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.PeoplePickerSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ResetRoleInheritanceDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SupportedUICultureDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DeleteTopNavigationNodesDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.TreeViewSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.RootWebDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DiagnosticsServiceBaseDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.EventReceiverDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.CalculatedFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.NumberFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.GuidFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.ComputedFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.URLFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.UserFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.DateTimeFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.BooleanFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.NoteFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.CurrencyFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.TextFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.InformationRightsManagementSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.MasterPageSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.RegionalSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SecureStoreApplicationDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.TargetApplicationDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.TrustedAccessProviderDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WebConfigModificationDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.BlogAdminWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.BlogLinksWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.BlogMonthQuickLaunchDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.DataFormWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.GettingStartedWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.ImageWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.MembersWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.PageViewerWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.PictureLibrarySlideshowWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.SilverlightWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.SimpleFormWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.SPTimelineWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.UserCodeWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.UserDocsWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.UserTasksWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.WebPartGalleryFileDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.XmlWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.UserDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WorkflowAssociationDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.AppPrincipalDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.BreakRoleInheritanceDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypes.RemoveContentTypeFieldLinksDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypes.HideContentTypeFieldLinksDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypes.UniqueContentTypeFieldsOrderDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.FarmSolutionDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.BusinessDataFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypes.RemoveContentTypeLinksDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.JobDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ManagedAccountDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SandboxSolutionDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypes.HideContentTypeLinksDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypes.UniqueContentTypeOrderDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.ClientWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.ScriptEditorWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.ContentEditorWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.ListViewWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.XsltListViewWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WelcomePageDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypeDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypeFieldLinkDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypeLinkDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.FolderDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ListFieldLinkDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ModuleFileDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.PrefixDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.QuickLaunchNavigationNodeDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SP2013WorkflowDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SP2013WorkflowSubscriptionDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.TopNavigationNodeDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.UserCustomActionDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.FarmDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.PropertyDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.FeatureDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ListDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ListViewDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SecurityGroupDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SecurityGroupLinkDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SecurityRoleDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SecurityRoleLinkDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SiteDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WebApplicationDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WebDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WebPartPageDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WikiPageDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ListItemFieldValueDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.DiscussionBoardListDefinitionValidationModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.BooleanFieldDefinitionValidationModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.DefaultContentTypeIdPropertyModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.DefaultRequiredPropertiesModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.DefaultNotAbsoluteUrlPropertiesModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.DefaultVersionBasedPropertiesModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.DefaultFieldInternalNamePropertyModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.DefaultXmlBasedPropertiesModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.dllSPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.DesignPackageDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.ProfileTypePropertyDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.CorePropertyDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.DocumentSetDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.DisplayTemplates.ControlDisplayTemplateDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.DisplayTemplates.FilterDisplayTemplateDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.ManagedPropertyDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.MetadataNavigationSettingsDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.ReusableHTMLItemDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.ReusableTextItemDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.AdvancedSearchBoxDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.CategoryWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.CommunityAdminWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.CommunityJoinWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.DocumentSetContentsWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.DocumentSetPropertiesWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.MyMembershipWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.ProjectSummaryWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.RefinementScriptWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.RSSAggregatorWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.SearchBoxScriptWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.SearchNavigationWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.SiteDocumentsDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.SocialCommentWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.TableOfContentsWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.TagCloudWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.CustomDocumentIdProviderDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.DisplayTemplates.JavaScriptDisplayTemplateDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.DisplayTemplates.ItemDisplayTemplateDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Fields.MediaFieldDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Fields.SummaryLinkFieldDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Fields.LinkFieldDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Fields.ImageFieldDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Fields.HTMLFieldDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.PageLayoutAndSiteTemplateSettingsDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.AudienceDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Fields.TaxonomyFieldDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.ImageRenditionDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.PublishingPageLayoutDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.PublishingPageDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.SearchConfigurationDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.SearchResultDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.SearchSettingsDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Taxonomy.TaxonomyTermLabelDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.WebNavigationSettingsDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.ContactFieldControlDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.ContentBySearchWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.ContentByQueryWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.ResultScriptWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.SiteFeedWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.SummaryLinkWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Taxonomy.TaxonomyTermDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Taxonomy.TaxonomyTermGroupDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Taxonomy.TaxonomyTermSetDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Taxonomy.TaxonomyTermStoreDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Services.ServiceModelHandlers.PublishingPageDefinitionValidationModelHandler, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.dllSPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.AnonymousAccessSettingsModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.AppModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.AppPrincipalModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Base.WebPartGalleryFileModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.BreakRoleInheritanceModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ClearRecycleBinModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ListItemModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ComposedLookItemLinkModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypeFieldLinkModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypeLinkModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypeModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypes.HideContentTypeFieldLinksModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypes.RemoveContentTypeFieldLinksModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypes.UniqueContentTypeFieldsOrderModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypes.HideContentTypeLinksModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypes.RemoveContentTypeLinksModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypes.UniqueContentTypeOrderModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.QuickLaunchNavigationNodeModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.DeleteQuickLaunchNavigationNodesModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.TopNavigationNodeModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.DeleteTopNavigationNodesModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.DeleteWebPartsModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.DiscussionReplyItemModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.EventReceiverModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.FeatureModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.FieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.LookupFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.DependentLookupFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.MultiChoiceFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.ChoiceFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.OutcomeChoiceFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.GeolocationFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.CalculatedFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.ComputedFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.NumberFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.GuidFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.URLFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.UserFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.BooleanFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.DateTimeFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.TextFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.NoteFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.CurrencyFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.BusinessDataFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.FolderModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.InformationRightsManagementSettingsModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ListFieldLinkModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ListItemFieldValuesModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ListItemFieldValueModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.DiscussionItemModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SharePointDesignerSettingsModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.UserModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ListModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ListViewModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.HtmlMasterPageModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.MasterPagePreviewModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.MasterPageSettingsModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.PropertyModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.MasterPageModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.RegionalSettingsModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ResetRoleInheritanceModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ComposedLookItemModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SecurityGroupLinkModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SecurityGroupModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SecurityRoleLinkModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SecurityRoleModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SiteModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SP2013WorkflowSubscriptionDefinitionModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SupportedUICultureModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.TreeViewSettingsModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.UserCustomActionModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.RootWebModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.WebModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.WebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.WebPartPageModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.BlogAdminWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.BlogLinksWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.BlogMonthQuickLaunchModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.DataFormWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.GettingStartedWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.ImageWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.MembersWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.PageViewerWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.PictureLibrarySlideshowWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.SilverlightWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.SimpleFormWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.SPTimelineWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.UserCodePartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.ClientWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.ScriptEditorWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.ContentEditorWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.ListViewWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.UserDocsWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.UserTasksWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.XmlWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.WelcomePageModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.WorkflowAssociationModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.WikiPageModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.XsltListViewWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ModuleFileModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SP2013WorkflowDefinitionHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.dllSPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.DisplayTemplates.ControlDisplayTemplateModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.DisplayTemplates.FilterDisplayTemplateModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.DisplayTemplates.JavaScriptDisplayTemplateModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.DisplayTemplates.ItemDisplayTemplateModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.SandboxSolutionModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.DesignPackageModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Fields.SummaryLinkFieldModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Fields.MediaFieldModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Fields.LinkFieldModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Fields.HTMLFieldModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Fields.ImageFieldModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Fields.TaxonomyFieldModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.DocumentSetModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.ImageRenditionModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.MetadataNavigationSettingsModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.PageLayoutAndSiteTemplateSettingsModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.PublishingPageLayoutModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.PublishingPageModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.ReusableHTMLItemModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.ReusableTextItemModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.SearchSettingsModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.SearchConfigurationModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.SearchResultModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Taxonomy.TaxonomyGroupModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermLabelModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermSetModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermStoreModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.WebNavigationSettingsModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.AdvancedSearchBoxModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.CategoryWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.CommunityAdminWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.CommunityJoinWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.ContentBySearchWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.DocumentSetContentsWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.DocumentSetPropertiesWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.MyMembershipWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.RefinementScriptWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.ResultScriptWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.ProjectSummaryWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.RSSAggregatorWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.SearchBoxScriptWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.SearchNavigationWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.SiteDocumentsModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.SocialCommentWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.SummaryLinkWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.ContactFieldControlModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.ContentByQueryWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.SiteFeedWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.TableOfContentsWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.TagCloudWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.dllSPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.AnonymousAccessSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.AuditSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.TopNavigationNodeModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DeleteTopNavigationNodesModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.QuickLaunchNavigationNodeModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DeleteQuickLaunchNavigationNodesModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ClearRecycleBinModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ComposedLookItemLinkModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DeleteWebPartsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ListItemModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DiscussionReplyItemModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DocumentParserModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.AlternateUrlModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.AppModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.AppPrincipalModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypes.HideContentTypeFieldLinksModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypes.RemoveContentTypeFieldLinksModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypes.RemoveContentTypeLinksModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypes.HideContentTypeLinksModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypes.UniqueContentTypeFieldsOrderModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DiagnosticsServiceBaseModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.EventReceiverModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.FarmSolutionModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.FieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.LookupFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.DependentLookupFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.GeolocationFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.MultiChoiceFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.ChoiceFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.OutcomeChoiceFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.URLFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.CalculatedFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.ComputedFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.DateTimeFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.BooleanFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.GuidFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.NumberFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.TextFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.NoteFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.CurrencyFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.UserFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentDatabaseModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.InformationRightsManagementSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ListItemFieldValuesModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.HtmlMasterPageModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DiscussionItemModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.MasterPagePreviewModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.MasterPageModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.PeoplePickerSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ResetRoleInheritanceModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ComposedLookItemModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SharePointDesignerSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.UserModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SupportedUICultureModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.TreeViewSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ManagedAccountModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.MasterPageSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.PropertyModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.BreakRoleInheritanceModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypeFieldLinkModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypeLinkModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypeModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.FeatureModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.BusinessDataFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.FolderModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.JobModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ListFieldLinkModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ListItemFieldValueModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ModuleFileModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.PrefixModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.RegionalSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SandboxSolutionModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SecureStoreApplicationModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SP2013WorkflowDefinitionHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SP2013WorkflowSubscriptionDefinitionModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.TargetApplicationModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypes.UniqueContentTypeOrderModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.UserCustomActionModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DeveloperDashboardSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.TrustedAccessProviderModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WebApplicationModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WebConfigModificationModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.RootWebModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.FarmModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ListModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ListViewModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SecurityGroupLinkModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SecurityGroupModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SecurityRoleLinkModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SecurityRoleModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SiteModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WebModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WebPartPageModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.BlogAdminWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.BlogLinksWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.BlogMonthQuickLaunchModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.ClientWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.DataFormWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.GettingStartedWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.ImageWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.ListViewWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.MembersWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.PageViewerWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.PictureLibrarySlideshowWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.SilverlightWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.SimpleFormWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.SPTimelineWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.UserCodePartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.UserDocsWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.UserTasksWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.WebPartGalleryFileModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.XmlWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.XsltListViewWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.ScriptEditorWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.ContentEditorWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WelcomePageModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WikiPageModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WorkflowAssociationModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.dllSPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.DesignPackageModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.CorePropertyModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.DocumentSetModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.DisplayTemplates.ControlDisplayTemplateModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.DisplayTemplates.FilterDisplayTemplateModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.DisplayTemplates.JavaScriptDisplayTemplateModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.DisplayTemplates.ItemDisplayTemplateModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Fields.SummaryLinkFieldModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Fields.MediaFieldDefinitionModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Fields.HTMLFieldModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Fields.ImageFieldModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Fields.LinkFieldModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.ManagedPropertyModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.MetadataNavigationSettingsModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.ReusableTextItemModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.ReusableHTMLItemModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.SearchSettingsModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.CustomDocumentIdProviderModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.PageLayoutAndSiteTemplateSettingsModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Fields.TaxonomyFieldModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.AudienceModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.ImageRenditionModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.PublishingPageLayoutModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.PublishingPageModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.SearchResultModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.SearchConfigurationModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermLabelModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermStoreModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermSetModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Taxonomy.TaxonomyGroupModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.WebNavigationSettingsModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.AdvancedSearchBoxModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.CategoryWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.CommunityAdminWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.CommunityJoinWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.ContentBySearchWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.DocumentSetContentsWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.DocumentSetPropertiesWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.MyMembershipWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.RefinementScriptWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.ResultScriptWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.RSSAggregatorWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.SearchBoxScriptWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.SearchNavigationWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.SiteDocumentsModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.SocialCommentWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.SummaryLinkWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.ContactFieldControlModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.ContentByQueryWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.SiteFeedWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.TableOfContentsWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.TagCloudWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.ProjectSummaryWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531a \ No newline at end of file +SPMeta2.dllSPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.AlternateUrlDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.AnonymousAccessSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SuiteBarDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.OfficialFileHostDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SharePointDesignerSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DeveloperDashboardSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.AppDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.AuditSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ClearRecycleBinDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ListItemDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ComposedLookItemDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ComposedLookItemLinkDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentDatabaseDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DeleteQuickLaunchNavigationNodesDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DeleteWebPartsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DiscussionReplyItemDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.FieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.LookupFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.DependentLookupFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DocumentParserDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.MultiChoiceFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.ChoiceFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.OutcomeChoiceFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.GeolocationFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DiscussionItemDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ListItemFieldValuesDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.HtmlMasterPageDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.MasterPagePreviewDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.MasterPageDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.PeoplePickerSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ResetRoleInheritanceDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SupportedUICultureDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DeleteTopNavigationNodesDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.TreeViewSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.RootWebDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.DiagnosticsServiceBaseDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.EventReceiverDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.CalculatedFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.NumberFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.GuidFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.ComputedFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.URLFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.UserFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.DateTimeFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.BooleanFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.NoteFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.CurrencyFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.TextFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.InformationRightsManagementSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.MasterPageSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.RegionalSettingsDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SecureStoreApplicationDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.TargetApplicationDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.TrustedAccessProviderDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WebConfigModificationDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.BlogAdminWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.BlogLinksWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.BlogMonthQuickLaunchDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.DataFormWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.GettingStartedWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.ImageWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.MembersWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.PageViewerWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.PictureLibrarySlideshowWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.SilverlightWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.SimpleFormWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.SPTimelineWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.UserCodeWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.UserDocsWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.UserTasksWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.WebPartGalleryFileDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.XmlWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.UserDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WorkflowAssociationDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.AppPrincipalDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.BreakRoleInheritanceDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypes.RemoveContentTypeFieldLinksDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypes.HideContentTypeFieldLinksDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypes.UniqueContentTypeFieldsOrderDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.FarmSolutionDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Fields.BusinessDataFieldDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypes.RemoveContentTypeLinksDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.JobDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ManagedAccountDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SandboxSolutionDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypes.HideContentTypeLinksDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypes.UniqueContentTypeOrderDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.ClientWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.ScriptEditorWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.ContentEditorWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.ListViewWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.Webparts.XsltListViewWebPartDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WelcomePageDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypeDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypeFieldLinkDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ContentTypeLinkDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.FolderDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ListFieldLinkDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ModuleFileDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.PrefixDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.QuickLaunchNavigationNodeDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SP2013WorkflowDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SP2013WorkflowSubscriptionDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.TopNavigationNodeDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.UserCustomActionDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.FarmDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.PropertyDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.FeatureDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ListDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ListViewDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SecurityGroupDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SecurityGroupLinkDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SecurityRoleDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SecurityRoleLinkDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.SiteDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WebApplicationDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WebDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WebPartPageDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.WikiPageDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Definitions.ListItemFieldValueDefinition, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.DiscussionBoardListDefinitionValidationModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.BooleanFieldDefinitionValidationModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.DefaultContentTypeIdPropertyModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.DefaultRequiredPropertiesModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.DefaultNotAbsoluteUrlPropertiesModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.DefaultVersionBasedPropertiesModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.DefaultFieldInternalNamePropertyModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Services.ServiceModelHandlers.DefaultXmlBasedPropertiesModelHandler, SPMeta2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.dllSPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.DesignPackageDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.ProfileTypePropertyDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.CorePropertyDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.DocumentSetDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.DisplayTemplates.ControlDisplayTemplateDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.DisplayTemplates.FilterDisplayTemplateDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.ManagedPropertyDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.MetadataNavigationSettingsDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.ReusableHTMLItemDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.ReusableTextItemDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.AdvancedSearchBoxDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.CategoryWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.CommunityAdminWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.CommunityJoinWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.DocumentSetContentsWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.DocumentSetPropertiesWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.MyMembershipWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.ProjectSummaryWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.RefinementScriptWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.RSSAggregatorWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.SearchBoxScriptWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.SearchNavigationWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.SiteDocumentsDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.SocialCommentWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.TableOfContentsWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.TagCloudWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.CustomDocumentIdProviderDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.DisplayTemplates.JavaScriptDisplayTemplateDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.DisplayTemplates.ItemDisplayTemplateDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Fields.MediaFieldDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Fields.SummaryLinkFieldDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Fields.LinkFieldDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Fields.ImageFieldDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Fields.HTMLFieldDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.PageLayoutAndSiteTemplateSettingsDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.AudienceDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Fields.TaxonomyFieldDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.ImageRenditionDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.PublishingPageLayoutDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.PublishingPageDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.SearchConfigurationDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.SearchResultDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.SearchSettingsDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Taxonomy.TaxonomyTermLabelDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.WebNavigationSettingsDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.ContactFieldControlDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.ContentBySearchWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.ContentByQueryWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.ResultScriptWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.SiteFeedWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Webparts.SummaryLinkWebPartDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Taxonomy.TaxonomyTermDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Taxonomy.TaxonomyTermGroupDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Taxonomy.TaxonomyTermSetDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Definitions.Taxonomy.TaxonomyTermStoreDefinition, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.Standard.Services.ServiceModelHandlers.PublishingPageDefinitionValidationModelHandler, SPMeta2.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.dllSPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.AnonymousAccessSettingsModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.AppModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.AppPrincipalModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Base.WebPartGalleryFileModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.BreakRoleInheritanceModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ClearRecycleBinModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ListItemModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ComposedLookItemLinkModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypeFieldLinkModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypeLinkModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypeModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypes.HideContentTypeFieldLinksModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypes.RemoveContentTypeFieldLinksModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypes.UniqueContentTypeFieldsOrderModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypes.HideContentTypeLinksModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypes.RemoveContentTypeLinksModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ContentTypes.UniqueContentTypeOrderModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.QuickLaunchNavigationNodeModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.DeleteQuickLaunchNavigationNodesModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.TopNavigationNodeModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.DeleteTopNavigationNodesModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.DeleteWebPartsModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.DiscussionReplyItemModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.EventReceiverModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.FeatureModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.FieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.LookupFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.DependentLookupFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.MultiChoiceFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.ChoiceFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.OutcomeChoiceFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.GeolocationFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.CalculatedFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.ComputedFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.NumberFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.GuidFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.URLFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.UserFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.BooleanFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.DateTimeFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.TextFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.NoteFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.CurrencyFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Fields.BusinessDataFieldModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.FolderModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.InformationRightsManagementSettingsModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ListFieldLinkModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ListItemFieldValuesModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ListItemFieldValueModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.DiscussionItemModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SharePointDesignerSettingsModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.UserModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ListModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ListViewModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.HtmlMasterPageModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.MasterPagePreviewModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.MasterPageSettingsModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.PropertyModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.MasterPageModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.RegionalSettingsModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ResetRoleInheritanceModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ComposedLookItemModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SecurityGroupLinkModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SecurityGroupModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SecurityRoleLinkModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SecurityRoleModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SiteModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SP2013WorkflowSubscriptionDefinitionModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SupportedUICultureModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.TreeViewSettingsModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.UserCustomActionModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.RootWebModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.WebModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.WebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.WebPartPageModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.BlogAdminWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.BlogLinksWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.BlogMonthQuickLaunchModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.DataFormWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.GettingStartedWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.ImageWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.MembersWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.PageViewerWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.PictureLibrarySlideshowWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.SilverlightWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.SimpleFormWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.SPTimelineWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.UserCodePartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.ClientWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.ScriptEditorWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.ContentEditorWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.ListViewWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.UserDocsWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.UserTasksWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.XmlWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.WelcomePageModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.WorkflowAssociationModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.WikiPageModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.Webparts.XsltListViewWebPartModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.ModuleFileModelHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.ModelHandlers.SP2013WorkflowDefinitionHandler, SPMeta2.CSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.dllSPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.DisplayTemplates.ControlDisplayTemplateModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.DisplayTemplates.FilterDisplayTemplateModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.DisplayTemplates.JavaScriptDisplayTemplateModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.DisplayTemplates.ItemDisplayTemplateModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.SandboxSolutionModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.DesignPackageModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Fields.SummaryLinkFieldModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Fields.MediaFieldModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Fields.LinkFieldModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Fields.HTMLFieldModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Fields.ImageFieldModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Fields.TaxonomyFieldModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.DocumentSetModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.ImageRenditionModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.MetadataNavigationSettingsModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.PageLayoutAndSiteTemplateSettingsModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.PublishingPageLayoutModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.PublishingPageModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.ReusableHTMLItemModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.ReusableTextItemModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.SearchSettingsModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.SearchConfigurationModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.SearchResultModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Taxonomy.TaxonomyGroupModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermLabelModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermSetModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermStoreModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.WebNavigationSettingsModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.AdvancedSearchBoxModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.CategoryWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.CommunityAdminWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.CommunityJoinWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.ContentBySearchWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.DocumentSetContentsWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.DocumentSetPropertiesWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.MyMembershipWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.RefinementScriptWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.ResultScriptWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.ProjectSummaryWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.RSSAggregatorWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.SearchBoxScriptWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.SearchNavigationWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.SiteDocumentsModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.SocialCommentWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.SummaryLinkWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.ContactFieldControlModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.ContentByQueryWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.SiteFeedWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.TableOfContentsWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.CSOM.Standard.ModelHandlers.Webparts.TagCloudWebPartModelHandler, SPMeta2.CSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.dllSPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.AnonymousAccessSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SuiteBarModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.OfficialFileHostModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.AuditSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.TopNavigationNodeModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DeleteTopNavigationNodesModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.QuickLaunchNavigationNodeModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DeleteQuickLaunchNavigationNodesModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ClearRecycleBinModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ComposedLookItemLinkModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DeleteWebPartsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ListItemModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DiscussionReplyItemModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DocumentParserModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.AlternateUrlModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.AppModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.AppPrincipalModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypes.HideContentTypeFieldLinksModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypes.RemoveContentTypeFieldLinksModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypes.RemoveContentTypeLinksModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypes.HideContentTypeLinksModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypes.UniqueContentTypeFieldsOrderModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DiagnosticsServiceBaseModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.EventReceiverModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.FarmSolutionModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.FieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.LookupFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.DependentLookupFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.GeolocationFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.MultiChoiceFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.ChoiceFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.OutcomeChoiceFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.URLFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.CalculatedFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.ComputedFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.DateTimeFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.BooleanFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.GuidFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.NumberFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.TextFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.NoteFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.CurrencyFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.UserFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentDatabaseModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.InformationRightsManagementSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ListItemFieldValuesModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.HtmlMasterPageModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DiscussionItemModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.MasterPagePreviewModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.MasterPageModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.PeoplePickerSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ResetRoleInheritanceModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ComposedLookItemModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SharePointDesignerSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.UserModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SupportedUICultureModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.TreeViewSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ManagedAccountModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.MasterPageSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.PropertyModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.BreakRoleInheritanceModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypeFieldLinkModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypeLinkModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypeModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.FeatureModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Fields.BusinessDataFieldModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.FolderModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.JobModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ListFieldLinkModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ListItemFieldValueModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ModuleFileModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.PrefixModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.RegionalSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SandboxSolutionModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SecureStoreApplicationModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SP2013WorkflowDefinitionHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SP2013WorkflowSubscriptionDefinitionModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.TargetApplicationModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ContentTypes.UniqueContentTypeOrderModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.UserCustomActionModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.DeveloperDashboardSettingsModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.TrustedAccessProviderModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WebApplicationModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WebConfigModificationModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.RootWebModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.FarmModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ListModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.ListViewModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SecurityGroupLinkModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SecurityGroupModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SecurityRoleLinkModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SecurityRoleModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.SiteModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WebModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WebPartPageModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.BlogAdminWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.BlogLinksWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.BlogMonthQuickLaunchModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.ClientWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.DataFormWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.GettingStartedWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.ImageWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.ListViewWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.MembersWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.PageViewerWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.PictureLibrarySlideshowWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.SilverlightWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.SimpleFormWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.SPTimelineWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.UserCodePartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.UserDocsWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.UserTasksWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.WebPartGalleryFileModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.XmlWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.XsltListViewWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.ScriptEditorWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.Webparts.ContentEditorWebPartModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WelcomePageModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WikiPageModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.ModelHandlers.WorkflowAssociationModelHandler, SPMeta2.SSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.dllSPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.DesignPackageModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.CorePropertyModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.DocumentSetModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.DisplayTemplates.ControlDisplayTemplateModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.DisplayTemplates.FilterDisplayTemplateModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.DisplayTemplates.JavaScriptDisplayTemplateModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.DisplayTemplates.ItemDisplayTemplateModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Fields.SummaryLinkFieldModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Fields.MediaFieldDefinitionModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Fields.HTMLFieldModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Fields.ImageFieldModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Fields.LinkFieldModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.ManagedPropertyModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.MetadataNavigationSettingsModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.ReusableTextItemModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.ReusableHTMLItemModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.SearchSettingsModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.CustomDocumentIdProviderModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.PageLayoutAndSiteTemplateSettingsModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Fields.TaxonomyFieldModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.AudienceModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.ImageRenditionModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.PublishingPageLayoutModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.PublishingPageModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.SearchResultModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.SearchConfigurationModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermLabelModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermStoreModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermSetModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Taxonomy.TaxonomyTermModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Taxonomy.TaxonomyGroupModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.WebNavigationSettingsModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.AdvancedSearchBoxModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.CategoryWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.CommunityAdminWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.CommunityJoinWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.ContentBySearchWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.DocumentSetContentsWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.DocumentSetPropertiesWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.MyMembershipWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.RefinementScriptWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.ResultScriptWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.RSSAggregatorWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.SearchBoxScriptWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.SearchNavigationWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.SiteDocumentsModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.SocialCommentWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.SummaryLinkWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.ContactFieldControlModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.ContentByQueryWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.SiteFeedWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.TableOfContentsWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.TagCloudWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531aSPMeta2.SSOM.Standard.ModelHandlers.Webparts.ProjectSummaryWebPartModelHandler, SPMeta2.SSOM.Standard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d71faae3bf28531a \ No newline at end of file diff --git a/SPMeta2/SPMeta2.CSOM.Standard/ModelHandlers/Fields/TaxonomyFieldModelHandler.cs b/SPMeta2/SPMeta2.CSOM.Standard/ModelHandlers/Fields/TaxonomyFieldModelHandler.cs index da25d5e70..2e267b50a 100644 --- a/SPMeta2/SPMeta2.CSOM.Standard/ModelHandlers/Fields/TaxonomyFieldModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM.Standard/ModelHandlers/Fields/TaxonomyFieldModelHandler.cs @@ -52,7 +52,10 @@ protected override void ProcessFieldProperties(Field field, FieldDefinition fiel // let base setting be setup base.ProcessFieldProperties(taxField, fieldModel); - taxField.AllowMultipleValues = taxFieldModel.IsMulti; + taxField.AllowMultipleValues = taxFieldModel.IsMulti; + + if (taxFieldModel.UserCreated.HasValue) + taxField.UserCreated = taxFieldModel.UserCreated.Value; if (taxFieldModel.Open.HasValue) taxField.Open = taxFieldModel.Open.Value; @@ -76,7 +79,9 @@ protected override void ProcessFieldProperties(Field field, FieldDefinition fiel taxField.TermSetId = termSet.Id; if (term != null) - taxField.AnchorId = term.Id; + taxField.AnchorId = term.Id; + + } public static TermStore LookupTermStore(ClientContext clientContext, diff --git a/SPMeta2/SPMeta2.CSOM.Standard/ModelHandlers/PublishingPageModelHandler.cs b/SPMeta2/SPMeta2.CSOM.Standard/ModelHandlers/PublishingPageModelHandler.cs index 532a505ae..34c2acfab 100644 --- a/SPMeta2/SPMeta2.CSOM.Standard/ModelHandlers/PublishingPageModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM.Standard/ModelHandlers/PublishingPageModelHandler.cs @@ -1,300 +1,306 @@ -using System; -using System.Linq; -using System.Text; -using Microsoft.SharePoint.Client; -using SPMeta2.Common; -using SPMeta2.CSOM.Extensions; -using SPMeta2.CSOM.ModelHandlers; -using SPMeta2.CSOM.ModelHosts; -using SPMeta2.Definitions; -using SPMeta2.Definitions.Base; -using SPMeta2.Enumerations; -using SPMeta2.ModelHosts; -using SPMeta2.Standard.Definitions; -using SPMeta2.Utils; -using SPMeta2.Standard.Enumerations; - -namespace SPMeta2.CSOM.Standard.ModelHandlers -{ - public class PublishingPageModelHandler : CSOMModelHandlerBase - { - #region properties - - public override Type TargetType - { - get { return typeof(PublishingPageDefinition); } - } - - #endregion - - #region methods - - public override void WithResolvingModelHost(ModelHostResolveContext modelHostContext) - { - var modelHost = modelHostContext.ModelHost; - var model = modelHostContext.Model; - var childModelType = modelHostContext.ChildModelType; - var action = modelHostContext.Action; - - var folderModelHost = modelHost as FolderModelHost; - var definition = model as PublishingPageDefinition; - - - - Folder folder = folderModelHost.CurrentListFolder; - - if (folder != null && definition != null) - { - var context = folder.Context; - var currentPage = GetCurrentPage(folderModelHost.CurrentList, folder, GetSafePageFileName(definition)); - - if (typeof(WebPartDefinitionBase).IsAssignableFrom(childModelType) - || childModelType == typeof(DeleteWebPartsDefinition)) - { - var listItemHost = ModelHostBase.Inherit(folderModelHost, itemHost => - { - itemHost.HostFile = currentPage; - itemHost.HostList = folderModelHost.CurrentList; - }); - - action(listItemHost); - - //currentListItem.Update(); - } - else if (typeof(BreakRoleInheritanceDefinition).IsAssignableFrom(childModelType) - || typeof(SecurityGroupLinkDefinition).IsAssignableFrom(childModelType)) - { - var currentListItem = currentPage.ListItemAllFields; - context.Load(currentListItem); - context.ExecuteQueryWithTrace(); - - var listItemHost = ModelHostBase.Inherit(folderModelHost, itemHost => - { - - itemHost.HostListItem = currentListItem; - }); - - action(listItemHost); - } - else - { - action(currentPage); - } - - //context.ExecuteQueryWithTrace(); - } - else - { - action(modelHost); - } - } - - protected string GetSafePageFileName(PageDefinitionBase page) - { - var fileName = page.FileName; - if (!fileName.EndsWith(".aspx")) fileName += ".aspx"; - - return fileName; - } - - - protected File GetCurrentPage(List list, Folder folder, string pageName) - { - var item = SearchItemByName(list, folder, pageName); - - if (item != null) - return item.File; - - return null; - } - - protected ListItem SearchItemByName(List list, Folder folder, string pageName) - { - var context = list.Context; - - if (folder != null) - { - if (!folder.IsPropertyAvailable("ServerRelativeUrl")) - { - folder.Context.Load(folder, f => f.ServerRelativeUrl); - folder.Context.ExecuteQueryWithTrace(); - } - } - - var dQuery = new CamlQuery(); - - string QueryString = "" + - "" + - "" + - "" + pageName + "" + - "" + - ""; - - dQuery.ViewXml = QueryString; - - if (folder != null) - dQuery.FolderServerRelativeUrl = folder.ServerRelativeUrl; - - var collListItems = list.GetItems(dQuery); - - context.Load(collListItems); - context.ExecuteQueryWithTrace(); - - return collListItems.FirstOrDefault(); - - } - - protected ListItem FindPublishingPage(List list, Folder folder, PublishingPageDefinition definition) - { - var pageName = GetSafePageFileName(definition); - var file = GetCurrentPage(list, folder, pageName); - - if (file != null) - return file.ListItemAllFields; - - return null; - } - - public override void DeployModel(object modelHost, DefinitionBase model) - { - var folderModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); - - var folder = folderModelHost.CurrentListFolder; - var list = folderModelHost.CurrentList; - - var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - - var contentTypeId = string.Empty; - - // pre load content type - if (!string.IsNullOrEmpty(definition.ContentTypeId)) - { - contentTypeId = definition.ContentTypeId; - - } - else if (!string.IsNullOrEmpty(definition.ContentTypeName)) - { - contentTypeId = ContentTypeLookupService - .LookupContentTypeByName(folderModelHost.CurrentList, definition.ContentTypeName) - .Id.ToString(); - } - - var context = folder.Context; - - var pageName = GetSafePageFileName(definition); - var currentPageFile = GetCurrentPage(list, folder, pageName); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioning, - Object = currentPageFile, - ObjectType = typeof(File), - ObjectDefinition = definition, - ModelHost = modelHost - }); - - ModuleFileModelHandler.WithSafeFileOperation(list, currentPageFile, f => - { - // create if only file does not exist - // overriting spoils the fields's content - // Investigate publishing page provision, Content property #744 - // https://github.com/SubPointSolutions/spmeta2/issues/744 - - if (f == null || !f.Exists) - { - var file = new FileCreationInformation(); - var pageContent = PublishingPageTemplates.RedirectionPageMarkup; - - file.Url = pageName; - file.Content = Encoding.UTF8.GetBytes(pageContent); - file.Overwrite = definition.NeedOverride; - - return folder.Files.Add(file); - } - - return f; - }, - newFile => - { - var newFileItem = newFile.ListItemAllFields; - context.Load(newFileItem); - context.ExecuteQueryWithTrace(); - - var site = folderModelHost.HostSite; - var currentPageLayoutItem = FindPageLayoutItem(site, definition.PageLayoutFileName); - - var currentPageLayoutItemContext = currentPageLayoutItem.Context; - var publishingFile = currentPageLayoutItem.File; - - currentPageLayoutItemContext.Load(currentPageLayoutItem); - currentPageLayoutItemContext.Load(currentPageLayoutItem, i => i.DisplayName); - currentPageLayoutItemContext.Load(publishingFile); - - currentPageLayoutItemContext.ExecuteQueryWithTrace(); - - // settig up dfault values if there is PublishingPageLayout setup - FieldLookupService.EnsureDefaultValues(newFileItem, definition.DefaultValues); - - if (!string.IsNullOrEmpty(definition.Title)) - newFileItem[BuiltInInternalFieldNames.Title] = definition.Title; - - if (!string.IsNullOrEmpty(definition.Description)) - newFileItem[BuiltInInternalFieldNames.Comments] = definition.Description; - - if (!string.IsNullOrEmpty(definition.Content)) - newFileItem[BuiltInInternalPublishingFieldNames.PublishingPageContent] = definition.Content; - - newFileItem[BuiltInInternalFieldNames.PublishingPageLayout] = publishingFile.ServerRelativeUrl + ", " + currentPageLayoutItem.DisplayName; - - var associatedContentTypeStringValue = ConvertUtils.ToString(currentPageLayoutItem[BuiltInInternalFieldNames.PublishingAssociatedContentType]); - - if (!string.IsNullOrEmpty(associatedContentTypeStringValue)) - { - var contentTypeValues = associatedContentTypeStringValue.Split(new string[] { ";#" }, StringSplitOptions.None); - var associatedContentTypeName = contentTypeValues[1]; - var associatedContentTypeId = contentTypeValues[2]; - - newFileItem[BuiltInInternalFieldNames.ContentTypeId] = associatedContentTypeId; - } - - if (!string.IsNullOrEmpty(contentTypeId)) - newFileItem[BuiltInInternalFieldNames.ContentTypeId] = contentTypeId; - - FieldLookupService.EnsureValues(newFileItem, definition.Values, true); - - newFileItem.Update(); - - context.ExecuteQueryWithTrace(); - }); - - currentPageFile = GetCurrentPage(folderModelHost.CurrentList, folder, pageName); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioned, - Object = currentPageFile, - ObjectType = typeof(File), - ObjectDefinition = definition, - ModelHost = modelHost - }); - - context.ExecuteQueryWithTrace(); - } - - private ListItem FindPageLayoutItem(Site site, string pageLayoutFileName) - { - var rootWeb = site.RootWeb; - var layoutsList = rootWeb.GetCatalog((int)ListTemplateType.MasterPageCatalog); - - var layoutItem = SearchItemByName(layoutsList, layoutsList.RootFolder, pageLayoutFileName); - - return layoutItem; - } - - #endregion - } -} +using System; +using System.Linq; +using System.Text; +using Microsoft.SharePoint.Client; +using SPMeta2.Common; +using SPMeta2.CSOM.Extensions; +using SPMeta2.CSOM.ModelHandlers; +using SPMeta2.CSOM.ModelHosts; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; +using SPMeta2.Enumerations; +using SPMeta2.ModelHosts; +using SPMeta2.Standard.Definitions; +using SPMeta2.Utils; +using SPMeta2.Standard.Enumerations; +using SPMeta2.Exceptions; + +namespace SPMeta2.CSOM.Standard.ModelHandlers +{ + public class PublishingPageModelHandler : CSOMModelHandlerBase + { + #region properties + + public override Type TargetType + { + get { return typeof(PublishingPageDefinition); } + } + + #endregion + + #region methods + + public override void WithResolvingModelHost(ModelHostResolveContext modelHostContext) + { + var modelHost = modelHostContext.ModelHost; + var model = modelHostContext.Model; + var childModelType = modelHostContext.ChildModelType; + var action = modelHostContext.Action; + + var folderModelHost = modelHost as FolderModelHost; + var definition = model as PublishingPageDefinition; + + Folder folder = folderModelHost.CurrentListFolder; + + if (folder != null && definition != null) + { + var context = folder.Context; + var currentPage = GetCurrentPage(folderModelHost.CurrentList, folder, GetSafePageFileName(definition)); + + if (currentPage == null) + { + throw new SPMeta2Exception( + string.Format("Cannot find publishing page fo definition:[{0}]", + definition)); + } + + if (typeof(WebPartDefinitionBase).IsAssignableFrom(childModelType) + || childModelType == typeof(DeleteWebPartsDefinition)) + { + var listItemHost = ModelHostBase.Inherit(folderModelHost, itemHost => + { + itemHost.HostFile = currentPage; + itemHost.HostList = folderModelHost.CurrentList; + }); + + action(listItemHost); + + //currentListItem.Update(); + } + else if (typeof(BreakRoleInheritanceDefinition).IsAssignableFrom(childModelType) + || typeof(SecurityGroupLinkDefinition).IsAssignableFrom(childModelType)) + { + var currentListItem = currentPage.ListItemAllFields; + context.Load(currentListItem); + context.ExecuteQueryWithTrace(); + + var listItemHost = ModelHostBase.Inherit(folderModelHost, itemHost => + { + + itemHost.HostListItem = currentListItem; + }); + + action(listItemHost); + } + else + { + action(currentPage); + } + + //context.ExecuteQueryWithTrace(); + } + else + { + action(modelHost); + } + } + + protected string GetSafePageFileName(PageDefinitionBase page) + { + var fileName = page.FileName; + if (!fileName.EndsWith(".aspx")) fileName += ".aspx"; + + return fileName; + } + + + protected File GetCurrentPage(List list, Folder folder, string pageName) + { + var item = SearchItemByName(list, folder, pageName); + + if (item != null) + return item.File; + + return null; + } + + protected ListItem SearchItemByName(List list, Folder folder, string pageName) + { + var context = list.Context; + + if (folder != null) + { + if (!folder.IsPropertyAvailable("ServerRelativeUrl")) + { + folder.Context.Load(folder, f => f.ServerRelativeUrl); + folder.Context.ExecuteQueryWithTrace(); + } + } + + var dQuery = new CamlQuery(); + + string QueryString = "" + + "" + + "" + + "" + pageName + "" + + "" + + ""; + + dQuery.ViewXml = QueryString; + + if (folder != null) + dQuery.FolderServerRelativeUrl = folder.ServerRelativeUrl; + + var collListItems = list.GetItems(dQuery); + + context.Load(collListItems); + context.ExecuteQueryWithTrace(); + + return collListItems.FirstOrDefault(); + + } + + protected ListItem FindPublishingPage(List list, Folder folder, PublishingPageDefinition definition) + { + var pageName = GetSafePageFileName(definition); + var file = GetCurrentPage(list, folder, pageName); + + if (file != null) + return file.ListItemAllFields; + + return null; + } + + public override void DeployModel(object modelHost, DefinitionBase model) + { + var folderModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + + var folder = folderModelHost.CurrentListFolder; + var list = folderModelHost.CurrentList; + + var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + var contentTypeId = string.Empty; + + // pre load content type + if (!string.IsNullOrEmpty(definition.ContentTypeId)) + { + contentTypeId = definition.ContentTypeId; + + } + else if (!string.IsNullOrEmpty(definition.ContentTypeName)) + { + contentTypeId = ContentTypeLookupService + .LookupContentTypeByName(folderModelHost.CurrentList, definition.ContentTypeName) + .Id.ToString(); + } + + var context = folder.Context; + + var pageName = GetSafePageFileName(definition); + var currentPageFile = GetCurrentPage(list, folder, pageName); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = currentPageFile, + ObjectType = typeof(File), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + ModuleFileModelHandler.WithSafeFileOperation(list, currentPageFile, f => + { + // create if only file does not exist + // overriting spoils the fields's content + // Investigate publishing page provision, Content property #744 + // https://github.com/SubPointSolutions/spmeta2/issues/744 + + if (f == null || !f.Exists) + { + var file = new FileCreationInformation(); + var pageContent = PublishingPageTemplates.RedirectionPageMarkup; + + file.Url = pageName; + file.Content = Encoding.UTF8.GetBytes(pageContent); + file.Overwrite = definition.NeedOverride; + + return folder.Files.Add(file); + } + + return f; + }, + newFile => + { + var newFileItem = newFile.ListItemAllFields; + context.Load(newFileItem); + context.ExecuteQueryWithTrace(); + + var site = folderModelHost.HostSite; + var currentPageLayoutItem = FindPageLayoutItem(site, definition.PageLayoutFileName); + + var currentPageLayoutItemContext = currentPageLayoutItem.Context; + var publishingFile = currentPageLayoutItem.File; + + currentPageLayoutItemContext.Load(currentPageLayoutItem); + currentPageLayoutItemContext.Load(currentPageLayoutItem, i => i.DisplayName); + currentPageLayoutItemContext.Load(publishingFile); + + currentPageLayoutItemContext.ExecuteQueryWithTrace(); + + // settig up dfault values if there is PublishingPageLayout setup + FieldLookupService.EnsureDefaultValues(newFileItem, definition.DefaultValues); + + if (!string.IsNullOrEmpty(definition.Title)) + newFileItem[BuiltInInternalFieldNames.Title] = definition.Title; + + if (!string.IsNullOrEmpty(definition.Description)) + newFileItem[BuiltInInternalFieldNames.Comments] = definition.Description; + + if (!string.IsNullOrEmpty(definition.Content)) + newFileItem[BuiltInInternalPublishingFieldNames.PublishingPageContent] = definition.Content; + + newFileItem[BuiltInInternalFieldNames.PublishingPageLayout] = publishingFile.ServerRelativeUrl + ", " + currentPageLayoutItem.DisplayName; + + var associatedContentTypeStringValue = ConvertUtils.ToString(currentPageLayoutItem[BuiltInInternalFieldNames.PublishingAssociatedContentType]); + + if (!string.IsNullOrEmpty(associatedContentTypeStringValue)) + { + var contentTypeValues = associatedContentTypeStringValue.Split(new string[] { ";#" }, StringSplitOptions.None); + var associatedContentTypeName = contentTypeValues[1]; + var associatedContentTypeId = contentTypeValues[2]; + + newFileItem[BuiltInInternalFieldNames.ContentTypeId] = associatedContentTypeId; + } + + if (!string.IsNullOrEmpty(contentTypeId)) + newFileItem[BuiltInInternalFieldNames.ContentTypeId] = contentTypeId; + + FieldLookupService.EnsureValues(newFileItem, definition.Values, true); + + newFileItem.Update(); + + context.ExecuteQueryWithTrace(); + }); + + currentPageFile = GetCurrentPage(folderModelHost.CurrentList, folder, pageName); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = currentPageFile, + ObjectType = typeof(File), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + context.ExecuteQueryWithTrace(); + } + + private ListItem FindPageLayoutItem(Site site, string pageLayoutFileName) + { + var rootWeb = site.RootWeb; + var layoutsList = rootWeb.GetCatalog((int)ListTemplateType.MasterPageCatalog); + + var layoutItem = SearchItemByName(layoutsList, layoutsList.RootFolder, pageLayoutFileName); + + return layoutItem; + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.CSOM.Standard/ModelHandlers/Webparts/ContentByQueryWebPartModelHandler.cs b/SPMeta2/SPMeta2.CSOM.Standard/ModelHandlers/Webparts/ContentByQueryWebPartModelHandler.cs index 3bb2ada6b..fa8e0a17e 100644 --- a/SPMeta2/SPMeta2.CSOM.Standard/ModelHandlers/Webparts/ContentByQueryWebPartModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM.Standard/ModelHandlers/Webparts/ContentByQueryWebPartModelHandler.cs @@ -243,7 +243,8 @@ protected override string GetWebpartXmlDefinition(ListItemModelHost listItemMode var targetWeb = webLookup.GetTargetWeb(listItemModelHost.HostSite, typedDefinition.WebUrl, - typedDefinition.WebId); + typedDefinition.WebId, + listItemModelHost); var list = targetWeb.QueryAndGetListByTitle(typedDefinition.ListName); wpXml.SetOrUpdateProperty("ListGuid", list.Id.ToString("D")); @@ -273,7 +274,8 @@ protected override string GetWebpartXmlDefinition(ListItemModelHost listItemMode var targetWeb = webLookup.GetTargetWeb(listItemModelHost.HostSite, typedDefinition.WebUrl, - typedDefinition.WebId); + typedDefinition.WebId, + listItemModelHost); var list = targetWeb.QueryAndGetListByUrl(typedDefinition.ListUrl); wpXml.SetOrUpdateProperty("ListGuid", list.Id.ToString("D")); diff --git a/SPMeta2/SPMeta2.CSOM.Standard/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.CSOM.Standard/Properties/AssemblyInfo.cs index 49e68f197..a7d971ed4 100644 --- a/SPMeta2/SPMeta2.CSOM.Standard/Properties/AssemblyInfo.cs +++ b/SPMeta2/SPMeta2.CSOM.Standard/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.2.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/Base/NavigationNodeModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Base/NavigationNodeModelHandler.cs index ec20d9cd5..8d9783ff5 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/Base/NavigationNodeModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Base/NavigationNodeModelHandler.cs @@ -54,8 +54,6 @@ protected NavigationNode LookupNodeForHost(object modelHost, NavigationNodeDefin { if (modelHost is WebModelHost) { - - return LookupNavigationNode(GetNavigationNodeCollection((modelHost as WebModelHost).HostWeb), definition); } else if (modelHost is NavigationNodeModelHost) diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypeLinkModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypeLinkModelHandler.cs index e980b76f0..19c95738e 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypeLinkModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypeLinkModelHandler.cs @@ -1,4 +1,6 @@ using System; +using System.Linq; +using System.Collections.Generic; using Microsoft.SharePoint.Client; using SPMeta2.Common; using SPMeta2.CSOM.Common; @@ -10,6 +12,7 @@ using SPMeta2.Utils; using SPMeta2.CSOM.ModelHosts; using SPMeta2.ModelHosts; +using SPMeta2.Exceptions; namespace SPMeta2.CSOM.ModelHandlers { @@ -33,7 +36,15 @@ public override void WithResolvingModelHost(ModelHostResolveContext modelHostCon var list = listModelHost.HostList; var context = list.Context; - context.Load(list, l => l.ContentTypes); + //context.Load(list, l => l.ContentTypes); + context.Load(list, l => l.ContentTypes.Include( + ct => ct.Id, + ct => ct.Name, + ct => ct.ReadOnly, + + ct => ct.Parent.Id + )); + context.ExecuteQueryWithTrace(); var contentType = FindListContentType(list, contentTypeLinkModel); @@ -48,7 +59,12 @@ public override void WithResolvingModelHost(ModelHostResolveContext modelHostCon action(contentTypeLinkHost); if (contentTypeLinkHost.ShouldUpdateHost) - contentType.Update(false); + { + if (!contentType.ReadOnly) + { + contentType.Update(false); + } + } context.ExecuteQueryWithTrace(); } @@ -72,15 +88,47 @@ public override void DeployModel(object modelHost, DefinitionBase model) var web = list.ParentWeb; // context.Load(web, w => w.AvailableContentTypes); - context.Load(list, l => l.ContentTypes); + //context.Load(list, l => l.ContentTypes); + context.Load(list, l => l.ContentTypes.Include( + ct => ct.Id, + ct => ct.Name, + ct => ct.ReadOnly, + + ct => ct.Parent.Id)); context.ExecuteQueryWithTrace(); - var targetContentType = web.AvailableContentTypes.GetById(contentTypeLinkModel.ContentTypeId); - var listContentType = FindListContentType(list, contentTypeLinkModel); + // load by id, then fallback on name + ContentType targetContentType = null; - context.Load(targetContentType); - context.ExecuteQueryWithTrace(); + if (!string.IsNullOrEmpty(contentTypeLinkModel.ContentTypeId)) + { + targetContentType = web.AvailableContentTypes.GetById(contentTypeLinkModel.ContentTypeId); + context.Load(targetContentType); + context.ExecuteQueryWithTrace(); + } + + if (targetContentType == null && !string.IsNullOrEmpty(contentTypeLinkModel.ContentTypeName)) + { + var name = contentTypeLinkModel.ContentTypeName; + + context.Load(web.AvailableContentTypes, c => c.Where(w => w.Name == name)); + context.ExecuteQueryWithTrace(); + + targetContentType = web.AvailableContentTypes[0]; + } + + if (targetContentType == null) + { + TraceService.ErrorFormat((int)LogEventId.ModelProvisionCoreCall, + "Cannot find site content type by ID: [{0}] or Name:[{1}].", + new object[] { contentTypeLinkModel.ContentTypeId, contentTypeLinkModel.ContentTypeName }); + + throw new SPMeta2Exception(string.Format("Cannot find site content type by ID: [{0}] or Name:[{1}].", + new object[] { contentTypeLinkModel.ContentTypeId, contentTypeLinkModel.ContentTypeName })); + } + + var listContentType = FindListContentType(list, contentTypeLinkModel); InvokeOnModelEvent(this, new ModelEventArgs { @@ -175,6 +223,8 @@ protected ContentType FindListContentType(List list, ContentTypeLinkDefinition c result = list.ContentTypes.FindByName(contentTypeLinkModel.ContentTypeName); } + + // trying to find by content type id // will never be resolved, actually // list content types have different ID @@ -183,7 +233,7 @@ protected ContentType FindListContentType(List list, ContentTypeLinkDefinition c // result = list.ContentTypes.GetById(contentTypeLinkModel.ContentTypeId); // trying to find by beat match - if (result == null) + if (result == null && !string.IsNullOrEmpty(contentTypeLinkModel.ContentTypeId)) { TraceService.InformationFormat((int)LogEventId.ModelProvisionCoreCall, "Trying to find list content type by ContentTypeId: [{0}]", contentTypeLinkModel.ContentTypeId); @@ -192,10 +242,26 @@ protected ContentType FindListContentType(List list, ContentTypeLinkDefinition c // http://officespdev.uservoice.com/forums/224641-general/suggestions/6356289-expose-spcontenttypecollection-bestmatch-for-csom // TODO, correct best match impl + + // "Item" ContentTypeLink #1016 + // replacing best match, it does not work on list scoped content types + + // Content type operations within a list + // http://docs.subpointsolutions.com/spmeta2/kb/kb-m2-000003.html + + //foreach (var contentType in list.ContentTypes) + //{ + // if (contentType.Id.ToString().ToUpper().StartsWith(contentTypeLinkModel.ContentTypeId.ToUpper())) + // result = contentType; + //} + foreach (var contentType in list.ContentTypes) { - if (contentType.Id.ToString().ToUpper().StartsWith(contentTypeLinkModel.ContentTypeId.ToUpper())) + if (contentType.Parent.Id.ToString().ToUpper() == contentTypeLinkModel.ContentTypeId.ToUpper()) + { result = contentType; + break; + } } } diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypeModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypeModelHandler.cs index 935fd45dc..fa969ec13 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypeModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypeModelHandler.cs @@ -82,6 +82,9 @@ public override void WithResolvingModelHost(ModelHostResolveContext modelHostCon var id = contentTypeModel.GetContentTypeId(); var currentContentType = web.ContentTypes.GetById(id); + context.Load(currentContentType); + context.Load(currentContentType, c => c.ReadOnly); + context.ExecuteQueryWithTrace(); #endif @@ -96,6 +99,12 @@ public override void WithResolvingModelHost(ModelHostResolveContext modelHostCon context.ExecuteQueryWithTrace(); var currentContentType = currentContentTypes.FirstOrDefault(); + + context.Load(currentContentType); + context.Load(currentContentType, c => c.ReadOnly); + + context.ExecuteQueryWithTrace(); + #endif if (childModelType == typeof(ModuleFileDefinition)) @@ -124,7 +133,11 @@ public override void WithResolvingModelHost(ModelHostResolveContext modelHostCon } TraceService.Information((int)LogEventId.ModelProvisionCoreCall, "Calling currentContentType.Update(true)"); - currentContentType.Update(true); + + if (!currentContentType.ReadOnly) + { + currentContentType.Update(true); + } context.ExecuteQueryWithTrace(); } @@ -335,9 +348,12 @@ public override void DeployModel(object modelHost, DefinitionBase model) if (!currentContentType.Sealed) { TraceService.Information((int)LogEventId.ModelProvisionCoreCall, "Calling currentContentType.Update(true)"); - currentContentType.Update(true); - context.ExecuteQueryWithTrace(); + if (!currentContentType.ReadOnly) + { + currentContentType.Update(true); + context.ExecuteQueryWithTrace(); + } } #endif } diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypes/HideContentTypeLinksModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypes/HideContentTypeLinksModelHandler.cs index d91d4c1ac..3da8393cd 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypes/HideContentTypeLinksModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypes/HideContentTypeLinksModelHandler.cs @@ -39,9 +39,16 @@ private void DeployHideContentTypeLinks(object modelHost, List list, Folder fold { var context = folder.Context; - TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "Fetching list content types and the order"); + TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "Fetching list content types and the order"); + + context.Load(list, l => l.ContentTypes.Include( + ct => ct.Id, + ct => ct.Name, + ct => ct.ReadOnly, + + ct => ct.Parent.Id + )); - context.Load(list, l => l.ContentTypes); context.Load(folder, f => f.ContentTypeOrder); context.ExecuteQueryWithTrace(); @@ -81,8 +88,15 @@ private void DeployHideContentTypeLinks(object modelHost, List list, Folder fold } if (listContentType == null && !string.IsNullOrEmpty(srcContentTypeDef.ContentTypeId)) - { - listContentType = listContentTypes.FirstOrDefault(c => c.Id.ToString().ToUpper().StartsWith(srcContentTypeDef.ContentTypeId.ToUpper())); + { + foreach (var contentType in list.ContentTypes) + { + if (contentType.Parent.Id.ToString().ToUpper() == srcContentTypeDef.ContentTypeId.ToUpper()) + { + listContentType = contentType; + break; + } + } if (listContentType != null) { @@ -95,7 +109,7 @@ private void DeployHideContentTypeLinks(object modelHost, List list, Folder fold { #if !NET35 - var existingCt = newContentTypeOrder.FirstOrDefault(ct => ct.StringValue.ToUpper() == listContentType.StringId.ToUpper()); + var existingCt = newContentTypeOrder.FirstOrDefault(ct => ct.ToString().ToUpper() == listContentType.Id.ToString().ToUpper()); if (existingCt != null && newContentTypeOrder.Contains(existingCt)) { diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypes/RemoveContentTypeLinksModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypes/RemoveContentTypeLinksModelHandler.cs index b7006327a..7ada4b272 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypes/RemoveContentTypeLinksModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypes/RemoveContentTypeLinksModelHandler.cs @@ -37,9 +37,15 @@ private void DeployHideContentTypeLinks(object modelHost, List list, RemoveConte { var context = list.Context; - TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "Fetching list content types"); - - context.Load(list, l => l.ContentTypes); + TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "Fetching list content types"); + + context.Load(list, l => l.ContentTypes.Include( + ct => ct.Id, + ct => ct.Name, + ct => ct.ReadOnly, + + ct => ct.Parent.Id + )); context.ExecuteQueryWithTrace(); var listContentTypes = list.ContentTypes.ToList(); @@ -72,10 +78,15 @@ private void DeployHideContentTypeLinks(object modelHost, List list, RemoveConte } if (listContentType == null && !string.IsNullOrEmpty(srcContentTypeDef.ContentTypeId)) - { - listContentType = - listContentTypes.FirstOrDefault( - c => c.Id.ToString().ToUpper().StartsWith(srcContentTypeDef.ContentTypeId.ToUpper())); + { + foreach (var contentType in list.ContentTypes) + { + if (contentType.Parent.Id.ToString().ToUpper() == srcContentTypeDef.ContentTypeId.ToUpper()) + { + listContentType = contentType; + break; + } + } if (listContentType != null) { diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypes/UniqueContentTypeOrderModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypes/UniqueContentTypeOrderModelHandler.cs index 40c696780..6c8673df7 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypes/UniqueContentTypeOrderModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ContentTypes/UniqueContentTypeOrderModelHandler.cs @@ -40,9 +40,15 @@ private void DeployContentTypeOrder(object modelHost, List list, Folder folder, { var context = folder.Context; - TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "Fetching list content types and the order"); - - context.Load(list, l => l.ContentTypes); + TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "Fetching list content types and the order"); + + context.Load(list, l => l.ContentTypes.Include( + ct => ct.Id, + ct => ct.Name, + ct => ct.ReadOnly, + + ct => ct.Parent.Id + )); context.Load(folder, f => f.ContentTypeOrder); context.ExecuteQueryWithTrace(); @@ -79,10 +85,16 @@ private void DeployContentTypeOrder(object modelHost, List list, Folder folder, } } -#if !NET35 if (listContentType == null && !string.IsNullOrEmpty(srcContentTypeDef.ContentTypeId)) - { - listContentType = listContentTypes.FirstOrDefault(c => c.Id.ToString().ToUpper().StartsWith(srcContentTypeDef.ContentTypeId.ToUpper())); + { + foreach (var contentType in list.ContentTypes) + { + if (contentType.Parent.Id.ToString().ToUpper() == srcContentTypeDef.ContentTypeId.ToUpper()) + { + listContentType = contentType; + break; + } + } if (listContentType != null) { @@ -90,7 +102,6 @@ private void DeployContentTypeOrder(object modelHost, List list, Folder folder, string.Format("Found content type by matching ID start:[{0}]", srcContentTypeDef.ContentTypeId)); } } -#endif if (listContentType != null && !newContentTypeOrder.Contains(listContentType.Id)) { diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/FieldModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/FieldModelHandler.cs index b3c87f8d8..4cf6b40f2 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/FieldModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/FieldModelHandler.cs @@ -295,6 +295,9 @@ protected virtual void ProcessFieldProperties(Field field, FieldDefinition defin field.Required = definition.Required; + if (definition.ReadOnlyField.HasValue) + field.ReadOnlyField = definition.ReadOnlyField.Value; + if (!string.IsNullOrEmpty(definition.StaticName)) field.StaticName = definition.StaticName; diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/Fields/LookupFieldModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Fields/LookupFieldModelHandler.cs index 80a735172..39697d555 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/Fields/LookupFieldModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Fields/LookupFieldModelHandler.cs @@ -8,6 +8,7 @@ using SPMeta2.Enumerations; using SPMeta2.Services; using SPMeta2.Utils; +using SPMeta2.CSOM.ModelHosts; namespace SPMeta2.CSOM.ModelHandlers.Fields { @@ -29,16 +30,38 @@ protected override Type GetTargetFieldType(FieldDefinition model) #region methods + protected override bool PreloadProperties(Field field) + { + base.PreloadProperties(field); + + var context = field.Context; + context.Load(field, f => f.SchemaXml); + + return true; + } + + protected override void ProcessFieldProperties(Field field, FieldDefinition fieldModel) { + var typedFieldModel = fieldModel.WithAssertAndCast("model", value => value.RequireNotNull()); + var site = HostSite; var context = site.Context; + // CountRelated in Lookups in CSOM #1018 + // https://github.com/SubPointSolutions/spmeta2/issues/673 + if (typedFieldModel.CountRelated.HasValue) + { + var fieldXml = XDocument.Parse(field.SchemaXml); + fieldXml.Root.SetAttribute("CountRelated", typedFieldModel.CountRelated.ToString().ToUpper()); + + field.SchemaXml = fieldXml.ToString(); + } + // let base setting be setup base.ProcessFieldProperties(field, fieldModel); var typedField = field.Context.CastTo(field); - var typedFieldModel = fieldModel.WithAssertAndCast("model", value => value.RequireNotNull()); if (!typedField.IsPropertyAvailable("LookupList")) { @@ -118,7 +141,12 @@ public Web GetTargetWeb(Site site, LookupFieldDefinition definition) return GetTargetWeb(site, definition.LookupWebUrl, definition.LookupWebId); } - public Web GetTargetWeb(Site site, string webUrl, Guid? webId) + protected Web GetTargetWeb(Site site, string webUrl, Guid? webId) + { + return GetTargetWeb(site, webUrl, webId, ModelHost); + } + + public Web GetTargetWeb(Site site, string webUrl, Guid? webId, object replacementObject) { var context = site.Context; @@ -133,16 +161,23 @@ public Web GetTargetWeb(Site site, string webUrl, Guid? webId) } else if (!string.IsNullOrEmpty(webUrl)) { - var oldValue = CSOMTokenReplacementService.AllowClientContextAsTokenReplacementContext; + if (replacementObject == null) + throw new ArgumentNullException("replacementObject"); + + //var oldValue = CSOMTokenReplacementService.AllowClientContextAsTokenReplacementContext; try { - CSOMTokenReplacementService.AllowClientContextAsTokenReplacementContext = true; + // restrict, only site / web + // Tokens in LookupWebUrl #1013 + // https://github.com/SubPointSolutions/spmeta2/issues/1013 + + //CSOMTokenReplacementService.AllowClientContextAsTokenReplacementContext = false; var targetWebUrl = TokenReplacementService.ReplaceTokens(new TokenReplacementContext { Value = webUrl, - Context = context + Context = replacementObject }).Value; // server relative url, ensure / in the beginning @@ -158,7 +193,7 @@ public Web GetTargetWeb(Site site, string webUrl, Guid? webId) } finally { - CSOMTokenReplacementService.AllowClientContextAsTokenReplacementContext = oldValue; + //CSOMTokenReplacementService.AllowClientContextAsTokenReplacementContext = oldValue; } } diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ListViewModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ListViewModelHandler.cs index 57199a4a8..3478ff6df 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/ListViewModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/ListViewModelHandler.cs @@ -262,6 +262,9 @@ public virtual void MapListViewProperties(List list, View listView, ListViewDefi if (definition.RowLimit > 0) listView.RowLimit = (uint)definition.RowLimit; + if (definition.MobileDefaultView.HasValue) + listView.MobileDefaultView = definition.MobileDefaultView.Value; + listView.DefaultView = definition.IsDefault; listView.Paged = definition.IsPaged; diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/UserCustomActionModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/UserCustomActionModelHandler.cs index d097fa8c2..0ffbe6025 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/UserCustomActionModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/UserCustomActionModelHandler.cs @@ -1,184 +1,200 @@ -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.Enumerations; -using SPMeta2.ModelHandlers; -using SPMeta2.Services; -using SPMeta2.Utils; - -namespace SPMeta2.CSOM.ModelHandlers -{ - public class UserCustomActionModelHandler : CSOMModelHandlerBase - { - #region properties - - public override Type TargetType - { - get { return typeof(UserCustomActionDefinition); } - } - - #endregion - - #region methods - - public override void DeployModel(object modelHost, DefinitionBase model) - { - if (!IsValidHostModelHost(modelHost)) - throw new Exception(string.Format("modelHost of type {0} is not supported.", modelHost.GetType())); - - var customAction = model.WithAssertAndCast("model", value => value.RequireNotNull()); - - DeploySiteCustomAction(modelHost, customAction); - } - - protected UserCustomAction GetCurrentCustomUserAction(object modelHost, - UserCustomActionDefinition customActionModel) - { - UserCustomActionCollection userCustomActions = null; - - return GetCurrentCustomUserAction(modelHost, customActionModel, out userCustomActions); - } - - private UserCustomAction GetCurrentCustomUserAction(object modelHost, UserCustomActionDefinition customActionModel - , out UserCustomActionCollection userCustomActions) - { - if (modelHost is SiteModelHost) - userCustomActions = (modelHost as SiteModelHost).HostSite.UserCustomActions; - else if (modelHost is WebModelHost) - userCustomActions = (modelHost as WebModelHost).HostWeb.UserCustomActions; - else if (modelHost is ListModelHost) - userCustomActions = (modelHost as ListModelHost).HostList.UserCustomActions; - else - { - throw new Exception(string.Format("modelHost of type {0} is not supported.", modelHost.GetType())); - } - - var context = userCustomActions.Context; - - context.Load(userCustomActions); - context.ExecuteQueryWithTrace(); - - return userCustomActions.FirstOrDefault(a => !string.IsNullOrEmpty(a.Name) && a.Name.ToUpper() == customActionModel.Name.ToUpper()); - } - - private void DeploySiteCustomAction(object modelHost, UserCustomActionDefinition model) - { - UserCustomActionCollection userCustomActions = null; - var existingAction = GetCurrentCustomUserAction(modelHost, model, out userCustomActions); - - var context = userCustomActions.Context; - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioning, - Object = null, - ObjectType = typeof(UserCustomAction), - ObjectDefinition = model, - ModelHost = modelHost - }); - - if (existingAction == null) - { - TraceService.Information((int)LogEventId.ModelProvisionProcessingNewObject, "Processing new user custom action"); - existingAction = userCustomActions.Add(); - } - else - { - TraceService.Information((int)LogEventId.ModelProvisionProcessingExistingObject, "Processing existing user custom action"); - } - - MapCustomAction(existingAction, model); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioned, - Object = existingAction, - ObjectType = typeof(UserCustomAction), - ObjectDefinition = model, - ModelHost = modelHost - }); - - - TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "Calling existingAction.Update()"); - existingAction.Update(); - - context.ExecuteQueryWithTrace(); - } - - private void MapCustomAction(UserCustomAction existringAction, UserCustomActionDefinition customAction) - { - TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "Updating user custom action properties."); - - existringAction.Sequence = customAction.Sequence; - existringAction.Description = customAction.Description; - existringAction.Group = customAction.Group; - existringAction.Location = customAction.Location; - existringAction.Name = customAction.Name; - existringAction.ScriptBlock = customAction.ScriptBlock; - existringAction.ScriptSrc = customAction.ScriptSrc; - existringAction.Title = customAction.Title; - existringAction.Url = customAction.Url; - - if (!string.IsNullOrEmpty(customAction.CommandUIExtension)) - existringAction.CommandUIExtension = customAction.CommandUIExtension; - - if (!string.IsNullOrEmpty(customAction.RegistrationId)) - existringAction.RegistrationId = customAction.RegistrationId; - - if (!string.IsNullOrEmpty(customAction.RegistrationType)) - { - // skipping setup for List script - // System.NotSupportedException: Setting this property is not supported. A value of List has already been set and cannot be changed. - if (customAction.RegistrationType != BuiltInRegistrationTypes.List) - { - existringAction.RegistrationType = - (UserCustomActionRegistrationType) - Enum.Parse(typeof(UserCustomActionRegistrationType), customAction.RegistrationType, true); - } - } - - var permissions = new BasePermissions(); - - if (customAction.Rights != null && customAction.Rights.Count > 0) - { - foreach (var permissionString in customAction.Rights) - permissions.Set((PermissionKind)Enum.Parse(typeof(PermissionKind), permissionString)); - } - - existringAction.Rights = permissions; - - - ProcessLocalization(existringAction, customAction); - } - - protected bool IsValidHostModelHost(object modelHost) - { - return - modelHost is SiteModelHost || - modelHost is WebModelHost || - modelHost is ListModelHost; - } - - protected virtual void ProcessLocalization(UserCustomAction obj, UserCustomActionDefinition definition) - { +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.Enumerations; +using SPMeta2.ModelHandlers; +using SPMeta2.Services; +using SPMeta2.Utils; + +namespace SPMeta2.CSOM.ModelHandlers +{ + public class UserCustomActionModelHandler : CSOMModelHandlerBase + { + #region properties + + public override Type TargetType + { + get { return typeof(UserCustomActionDefinition); } + } + + #endregion + + #region methods + + public override void DeployModel(object modelHost, DefinitionBase model) + { + if (!IsValidHostModelHost(modelHost)) + throw new Exception(string.Format("modelHost of type {0} is not supported.", modelHost.GetType())); + + var customAction = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + DeploySiteCustomAction(modelHost, customAction); + } + + protected UserCustomAction GetCurrentCustomUserAction(object modelHost, + UserCustomActionDefinition customActionModel) + { + UserCustomActionCollection userCustomActions = null; + + return GetCurrentCustomUserAction(modelHost, customActionModel, out userCustomActions); + } + + private UserCustomAction GetCurrentCustomUserAction(object modelHost, UserCustomActionDefinition customActionModel + , out UserCustomActionCollection userCustomActions) + { + if (modelHost is SiteModelHost) + userCustomActions = (modelHost as SiteModelHost).HostSite.UserCustomActions; + else if (modelHost is WebModelHost) + userCustomActions = (modelHost as WebModelHost).HostWeb.UserCustomActions; + else if (modelHost is ListModelHost) + userCustomActions = (modelHost as ListModelHost).HostList.UserCustomActions; + else + { + throw new Exception(string.Format("modelHost of type {0} is not supported.", modelHost.GetType())); + } + + var context = userCustomActions.Context; + + context.Load(userCustomActions); + context.ExecuteQueryWithTrace(); + + return userCustomActions.FirstOrDefault(a => !string.IsNullOrEmpty(a.Name) && a.Name.ToUpper() == customActionModel.Name.ToUpper()); + } + + private void DeploySiteCustomAction(object modelHost, UserCustomActionDefinition model) + { + UserCustomActionCollection userCustomActions = null; + var existingAction = GetCurrentCustomUserAction(modelHost, model, out userCustomActions); + + var context = userCustomActions.Context; + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = null, + ObjectType = typeof(UserCustomAction), + ObjectDefinition = model, + ModelHost = modelHost + }); + + if (existingAction == null) + { + TraceService.Information((int)LogEventId.ModelProvisionProcessingNewObject, "Processing new user custom action"); + existingAction = userCustomActions.Add(); + } + else + { + TraceService.Information((int)LogEventId.ModelProvisionProcessingExistingObject, "Processing existing user custom action"); + } + + MapCustomAction(existingAction, model); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = existingAction, + ObjectType = typeof(UserCustomAction), + ObjectDefinition = model, + ModelHost = modelHost + }); + + + TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "Calling existingAction.Update()"); + existingAction.Update(); + + context.ExecuteQueryWithTrace(); + } + + private void MapCustomAction(UserCustomAction existringAction, UserCustomActionDefinition customAction) + { + TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "Updating user custom action properties."); + + existringAction.Sequence = customAction.Sequence; + existringAction.Group = customAction.Group; + existringAction.Location = customAction.Location; + existringAction.Name = customAction.Name; + existringAction.ScriptBlock = customAction.ScriptBlock; + existringAction.ScriptSrc = customAction.ScriptSrc; + + // fallback for old models + // fill out Title/Description with Name if NULLs + // that needs for SP2016 to work well with translation exports + + // UserCustomAction without Title/Description breaks Translation Export #937 + // https://github.com/SubPointSolutions/spmeta2/issues/937 + + if (!string.IsNullOrEmpty(customAction.Title)) + existringAction.Title = customAction.Title; + else + existringAction.Title = customAction.Name; + + if (!string.IsNullOrEmpty(customAction.Description)) + existringAction.Description = customAction.Description; + else + existringAction.Description = customAction.Name; + + existringAction.Url = customAction.Url; + + if (!string.IsNullOrEmpty(customAction.CommandUIExtension)) + existringAction.CommandUIExtension = customAction.CommandUIExtension; + + if (!string.IsNullOrEmpty(customAction.RegistrationId)) + existringAction.RegistrationId = customAction.RegistrationId; + + if (!string.IsNullOrEmpty(customAction.RegistrationType)) + { + // skipping setup for List script + // System.NotSupportedException: Setting this property is not supported. A value of List has already been set and cannot be changed. + if (customAction.RegistrationType != BuiltInRegistrationTypes.List) + { + existringAction.RegistrationType = + (UserCustomActionRegistrationType) + Enum.Parse(typeof(UserCustomActionRegistrationType), customAction.RegistrationType, true); + } + } + + var permissions = new BasePermissions(); + + if (customAction.Rights != null && customAction.Rights.Count > 0) + { + foreach (var permissionString in customAction.Rights) + permissions.Set((PermissionKind)Enum.Parse(typeof(PermissionKind), permissionString)); + } + + existringAction.Rights = permissions; + + + ProcessLocalization(existringAction, customAction); + } + + protected bool IsValidHostModelHost(object modelHost) + { + return + modelHost is SiteModelHost || + modelHost is WebModelHost || + modelHost is ListModelHost; + } + + protected virtual void ProcessLocalization(UserCustomAction obj, UserCustomActionDefinition definition) + { ProcessGenericLocalization(obj, new Dictionary> { { "TitleResource", definition.TitleResource }, { "DescriptionResource", definition.DescriptionResource }, { "CommandUIExtensionResource", definition.CommandUIExtensionResource }, - }); - } - - #endregion - } -} + }); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/WebPartModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/WebPartModelHandler.cs index 0d6e61791..84456120c 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/WebPartModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/WebPartModelHandler.cs @@ -302,13 +302,15 @@ protected virtual string ProcessCommonWebpartProperties(string webPartXml, WebPa if (!string.IsNullOrEmpty(definition.ExportMode)) xml.SetExportMode(definition.ExportMode); + if (definition.Hidden.HasValue) + xml.SetHidden(definition.Hidden.Value); + // bindings ProcessParameterBindings(definition, xml); // properties ProcessWebpartProperties(definition, xml); - return xml.ToString(); } diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/ListViewWebPartModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/ListViewWebPartModelHandler.cs index 88f086b4f..fc4319d38 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/ListViewWebPartModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/ListViewWebPartModelHandler.cs @@ -221,7 +221,10 @@ protected override void InternalOnAfterWebPartProvision(WebPartProcessingContext if (typedDefinition.WebId.HasGuidValue() || !string.IsNullOrEmpty(typedDefinition.WebUrl)) { targetWeb = new LookupFieldModelHandler() - .GetTargetWeb(this.CurrentClientContext.Site, typedDefinition.WebUrl, typedDefinition.WebId); + .GetTargetWeb(this.CurrentClientContext.Site, + typedDefinition.WebUrl, + typedDefinition.WebId, + provisionContext.ListItemModelHost); } var list = XsltListViewWebPartModelHandler.LookupList(targetWeb, typedDefinition.ListUrl, typedDefinition.ListTitle, typedDefinition.ListId); diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/XsltListViewWebPartModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/XsltListViewWebPartModelHandler.cs index 368e0e32d..0b774cdcd 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/XsltListViewWebPartModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/XsltListViewWebPartModelHandler.cs @@ -210,8 +210,13 @@ protected override void InternalOnAfterWebPartProvision(WebPartProcessingContext if (typedDefinition.WebId.HasGuidValue() || !string.IsNullOrEmpty(typedDefinition.WebUrl)) { - targetWeb = new LookupFieldModelHandler() - .GetTargetWeb(this.CurrentClientContext.Site, typedDefinition.WebUrl, typedDefinition.WebId); + var lookupFieldModelHandler = new LookupFieldModelHandler(); + + targetWeb = lookupFieldModelHandler.GetTargetWeb( + this.CurrentClientContext.Site, + typedDefinition.WebUrl, + typedDefinition.WebId, + provisionContext.ListItemModelHost); } var list = LookupList(targetWeb, typedDefinition.ListUrl, typedDefinition.ListTitle, typedDefinition.ListId); @@ -314,9 +319,14 @@ string webPartTitleUrl if (webId.HasGuidValue() || !string.IsNullOrEmpty(webUrl)) { - targetWeb = new LookupFieldModelHandler() - .GetTargetWeb(listItemModelHost.HostClientContext.Site, - webUrl, webId); + var lookupFieldModelHandler = new LookupFieldModelHandler(); + + targetWeb = lookupFieldModelHandler + .GetTargetWeb( + listItemModelHost.HostClientContext.Site, + webUrl, + webId, + listItemModelHost); result.WebId = targetWeb.Id; } diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/WorkflowAssociationModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/WorkflowAssociationModelHandler.cs index 7dee7edce..dcc4198c8 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/WorkflowAssociationModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/WorkflowAssociationModelHandler.cs @@ -230,7 +230,11 @@ private void DeployContentTypeWorkflowAssociationDefinition(object modelHost, Co ModelHost = modelHost }); - contentType.Update(true); + if (!contentType.ReadOnly) + { + contentType.Update(true); + } + context.ExecuteQueryWithTrace(); } else @@ -256,7 +260,11 @@ private void DeployContentTypeWorkflowAssociationDefinition(object modelHost, Co //existingWorkflowAssotiation.Update(); - contentType.Update(true); + if (!contentType.ReadOnly) + { + contentType.Update(true); + } + context.ExecuteQueryWithTrace(); } } diff --git a/SPMeta2/SPMeta2.CSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.CSOM/Properties/AssemblyInfo.cs index 46e9cd6f9..9d0043423 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.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2.CSOM/Services/CSOMProvisionService.cs b/SPMeta2/SPMeta2.CSOM/Services/CSOMProvisionService.cs index e1554bdaa..16a5c9e32 100644 --- a/SPMeta2/SPMeta2.CSOM/Services/CSOMProvisionService.cs +++ b/SPMeta2/SPMeta2.CSOM/Services/CSOMProvisionService.cs @@ -12,6 +12,7 @@ using System.Diagnostics; using SPMeta2.CSOM.Services.Impl; using SPMeta2.Exceptions; +using SPMeta2.Common; namespace SPMeta2.CSOM.Services { @@ -116,4 +117,61 @@ public static void DeployListModel(this CSOMProvisionService modelHost, ClientCo modelHost.DeployModel(listHost, model); } } + + public static class SSOMProvisionServiceIncrementalExtensions + { + /// + /// A shortcut for incremental provision + /// Sets incremental provision mode with AutoDetectSharePointPersistenceStorage = true + /// Once done, reverts back to default provision mode + /// + public static void DeploySiteModelIncrementally(this CSOMProvisionService modelHost, + ClientContext context, + ModelNode model, + string incrementalModelId) + { + DeploySiteModelIncrementally(modelHost, context, model, incrementalModelId, null); + } + + /// + /// A shortcut for incremental provision + /// Sets incremental provision mode with AutoDetectSharePointPersistenceStorage = true + /// Once done, reverts back to default provision mode + /// + public static void DeploySiteModelIncrementally(this CSOMProvisionService modelHost, + ClientContext context, + ModelNode model, + string incrementalModelId, + Action config) + { + modelHost.DeployModelIncrementally(new SiteModelHost(context), model, incrementalModelId, config); + } + + /// + /// A shortcut for incremental provision + /// Sets incremental provision mode with AutoDetectSharePointPersistenceStorage = true + /// Once done, reverts back to default provision mode + /// + public static void DeployWebModelIncrementally(this CSOMProvisionService modelHost, + ClientContext context, + ModelNode model, + string incrementalModelId) + { + DeployWebModelIncrementally(modelHost, context, model, incrementalModelId, null); + } + + /// + /// A shortcut for incremental provision + /// Sets incremental provision mode with IncrementalProvisionConfig.AutoDetectSharePointPersistenceStorage = true + /// Once done, reverts back to default provision mode + /// Callback on IncrementalProvisionConfig makes it easy to configure IncrementalProvisionConfig instance + public static void DeployWebModelIncrementally(this CSOMProvisionService modelHost, + ClientContext context, + ModelNode model, + string incrementalModelId, + Action config) + { + modelHost.DeployModelIncrementally(new WebModelHost(context), model, incrementalModelId, config); + } + } } diff --git a/SPMeta2/SPMeta2.CSOM/Services/CSOMTokenReplacementService.cs b/SPMeta2/SPMeta2.CSOM/Services/CSOMTokenReplacementService.cs index 33532627e..ac36d80d2 100644 --- a/SPMeta2/SPMeta2.CSOM/Services/CSOMTokenReplacementService.cs +++ b/SPMeta2/SPMeta2.CSOM/Services/CSOMTokenReplacementService.cs @@ -48,6 +48,8 @@ public CSOMTokenReplacementService() /// Incorrect ~site token resolution for CSOM for the subwebs #863 /// https://github.com/SubPointSolutions/spmeta2/issues/863 /// + /// + [Obsolete("Obsolete, isn't used anymore - Tokens in LookupWebUrl #1013 - https://github.com/SubPointSolutions/spmeta2/issues/1013")] public static bool AllowClientContextAsTokenReplacementContext { get; set; } #endregion @@ -120,6 +122,10 @@ public override TokenReplacementResult ReplaceTokens(TokenReplacementContext con } } + // remove ending slash, SharePoint removes it everywhere + if (result.Value.Length > 1) + result.Value = result.Value.TrimEnd('/'); + if (OnTokenReplaced != null) { OnTokenReplaced(this, new TokenReplacementResultEventArgs @@ -140,8 +146,12 @@ protected virtual string ResolveToken(TokenReplacementContext tokenContext, obje var site = ExtractSite(contextObject); - if (site.ServerRelativeUrl == "/") - return string.Empty; + // Incorrect ~site/~sitecollection tokens resolve in NavigationNodes #1025 + // https://github.com/SubPointSolutions/spmeta2/issues/1025 + // always return '/' instead of empty string, further replacements would fix up double-'/' + + //if (site.ServerRelativeUrl == "/") + // return string.Empty; return site.ServerRelativeUrl; } @@ -156,8 +166,12 @@ protected virtual string ResolveToken(TokenReplacementContext tokenContext, obje return "/" + web.ServerRelativeUrl.Replace(site.ServerRelativeUrl, string.Empty); } - if (web.ServerRelativeUrl == "/") - return string.Empty; + // Incorrect ~site/~sitecollection tokens resolve in NavigationNodes #1025 + // https://github.com/SubPointSolutions/spmeta2/issues/1025 + // always return '/' instead of empty string, further replacements would fix up double-'/' + + //if (web.ServerRelativeUrl == "/") + // return string.Empty; return web.ServerRelativeUrl; } diff --git a/SPMeta2/SPMeta2.Containers.CSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.CSOM/Properties/AssemblyInfo.cs index 11f033529..621a0779a 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.17104.0417")] \ No newline at end of file +[assembly: AssemblyFileVersion("1.2.17191.0958")] \ No newline at end of file diff --git a/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer/Package/Package.Template.xml b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer/Package/Package.Template.xml new file mode 100644 index 000000000..8740d4d0d --- /dev/null +++ b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer/Package/Package.Template.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer/Package/Package.package b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer/Package/Package.package new file mode 100644 index 000000000..c2e454659 --- /dev/null +++ b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer/Package/Package.package @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..84a43f4a4 --- /dev/null +++ b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer/Properties/AssemblyInfo.cs @@ -0,0 +1,38 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Security; + +// 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.Containers.FarmSolutionWebAppContainer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SPMeta2.Containers.FarmSolutionWebAppContainer")] +[assembly: AssemblyCopyright("Copyright © 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("9a306ec6-de61-49b9-940d-7c1a36fc15ad")] + +// 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.17191.0958")] + diff --git a/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer/SPMeta2.Containers.FarmSolutionWebAppContainer.csproj b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer/SPMeta2.Containers.FarmSolutionWebAppContainer.csproj new file mode 100644 index 000000000..db638d82f --- /dev/null +++ b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer/SPMeta2.Containers.FarmSolutionWebAppContainer.csproj @@ -0,0 +1,75 @@ + + + + + Debug + AnyCPU + {9A306EC6-DE61-49B9-940D-7C1A36FC15AD} + Library + Properties + SPMeta2.Containers.FarmSolutionWebAppContainer + SPMeta2.Containers.FarmSolutionWebAppContainer + v4.5 + 15.0 + 512 + {C1CDDADD-2546-481F-9697-4EA41081F2FC};{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + WebApplication + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + true + + + key.snk + + + + + + + + + + + + + + + + + + {c6cf3a69-1a73-4cc5-9c67-e3859a071197} + + + Package.package + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + \ No newline at end of file diff --git a/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer/key.snk b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer/key.snk new file mode 100644 index 000000000..84a8f8a1a Binary files /dev/null and b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer/key.snk differ diff --git a/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer1/Package/Package.Template.xml b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer1/Package/Package.Template.xml new file mode 100644 index 000000000..8740d4d0d --- /dev/null +++ b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer1/Package/Package.Template.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer1/Package/Package.package b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer1/Package/Package.package new file mode 100644 index 000000000..b21d14b51 --- /dev/null +++ b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer1/Package/Package.package @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer1/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer1/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..369a5fa16 --- /dev/null +++ b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer1/Properties/AssemblyInfo.cs @@ -0,0 +1,38 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Security; + +// 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.Containers.FarmSolutionWebAppContainer1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SPMeta2.Containers.FarmSolutionWebAppContainer1")] +[assembly: AssemblyCopyright("Copyright © 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("b9ddd9d7-99af-4849-a559-c02558d4f774")] + +// 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.17191.0958")] + diff --git a/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer1/SPMeta2.Containers.FarmSolutionWebAppContainer1.csproj b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer1/SPMeta2.Containers.FarmSolutionWebAppContainer1.csproj new file mode 100644 index 000000000..33a59c31b --- /dev/null +++ b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer1/SPMeta2.Containers.FarmSolutionWebAppContainer1.csproj @@ -0,0 +1,75 @@ + + + + + Debug + AnyCPU + {B9DDD9D7-99AF-4849-A559-C02558D4F774} + Library + Properties + SPMeta2.Containers.FarmSolutionWebAppContainer1 + SPMeta2.Containers.FarmSolutionWebAppContainer1 + v4.5 + 15.0 + 512 + {C1CDDADD-2546-481F-9697-4EA41081F2FC};{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + WebApplication + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + true + + + key.snk + + + + + + + + + + + + + + + + + + {c21f84bc-1af5-4f19-b4bd-19e7047bf211} + + + Package.package + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + \ No newline at end of file diff --git a/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer1/key.snk b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer1/key.snk new file mode 100644 index 000000000..4e92e1859 Binary files /dev/null and b/SPMeta2/SPMeta2.Containers.FarmSolutionWebAppContainer1/key.snk differ diff --git a/SPMeta2/SPMeta2.Containers.O365/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.O365/Properties/AssemblyInfo.cs index 231fa7c70..a32fdaf5a 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.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2.Containers.SSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.SSOM/Properties/AssemblyInfo.cs index 15deea26d..7c0954113 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.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2.Containers.Standard/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.Standard/Properties/AssemblyInfo.cs index 8c2a30d4f..4321573d9 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.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2.Containers/Consts/DefaultContainers.cs b/SPMeta2/SPMeta2.Containers/Consts/DefaultContainers.cs index 724827d8a..65ea0a2ba 100644 --- a/SPMeta2/SPMeta2.Containers/Consts/DefaultContainers.cs +++ b/SPMeta2/SPMeta2.Containers/Consts/DefaultContainers.cs @@ -55,6 +55,20 @@ public static class FarmSolution public static Guid SolutionId = new Guid("a4a2146d-57d1-48bd-a02e-ba97b371903d"); } + + + public static class FarmSolutionWebScope + { + public static string FilePath = @"Containers\Farm\SPMeta2.Containers.FarmSolutionWebAppContainer.wsp"; + public static Guid SolutionId = new Guid("c6cf3a69-1a73-4cc5-9c67-e3859a071197"); + } + + public static class FarmSolutionWebScope1 + { + public static string FilePath = @"Containers\Farm\SPMeta2.Containers.FarmSolutionWebAppContainer1.wsp"; + public static Guid SolutionId = new Guid("c21f84bc-1af5-4f19-b4bd-19e7047bf211"); + } + public static class Apps { public static Guid ProductId = new Guid("{e81b6820-5d57-4d17-a098-5f4317f6c400}"); diff --git a/SPMeta2/SPMeta2.Containers/Containers/Farm/SPMeta2.Containers.FarmSolutionWebAppContainer.wsp b/SPMeta2/SPMeta2.Containers/Containers/Farm/SPMeta2.Containers.FarmSolutionWebAppContainer.wsp new file mode 100644 index 000000000..83c3dbbb6 Binary files /dev/null and b/SPMeta2/SPMeta2.Containers/Containers/Farm/SPMeta2.Containers.FarmSolutionWebAppContainer.wsp differ diff --git a/SPMeta2/SPMeta2.Containers/Containers/Farm/SPMeta2.Containers.FarmSolutionWebAppContainer1.wsp b/SPMeta2/SPMeta2.Containers/Containers/Farm/SPMeta2.Containers.FarmSolutionWebAppContainer1.wsp new file mode 100644 index 000000000..e29670d30 Binary files /dev/null and b/SPMeta2/SPMeta2.Containers/Containers/Farm/SPMeta2.Containers.FarmSolutionWebAppContainer1.wsp differ diff --git a/SPMeta2/SPMeta2.Containers/DefinitionGenerators/OfficialFileHostDefinitionGenerator.cs b/SPMeta2/SPMeta2.Containers/DefinitionGenerators/OfficialFileHostDefinitionGenerator.cs new file mode 100644 index 000000000..4b80b18ba --- /dev/null +++ b/SPMeta2/SPMeta2.Containers/DefinitionGenerators/OfficialFileHostDefinitionGenerator.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.ObjectModel; +using SPMeta2.Containers.Services.Base; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; +using SPMeta2.Containers.Services; +using SPMeta2.Enumerations; + +namespace SPMeta2.Containers.DefinitionGenerators +{ + public class OfficialFileHostDefinitionGenerator : TypedDefinitionGeneratorServiceBase + { + public override DefinitionBase GenerateRandomDefinition(Action action) + { + return WithEmptyDefinition(def => + { + def.OfficialFileName = Rnd.String(); + def.OfficialFileUrl = Rnd.HttpsUrl(); + + def.Action = Rnd.RandomFromArray( + new[]{ + OfficialFileAction.Copy, + OfficialFileAction.Link, + OfficialFileAction.Move + }); + }); + } + } +} diff --git a/SPMeta2/SPMeta2.Containers/DefinitionGenerators/SuiteBarDefinitionGenerator.cs b/SPMeta2/SPMeta2.Containers/DefinitionGenerators/SuiteBarDefinitionGenerator.cs new file mode 100644 index 000000000..cff50ea21 --- /dev/null +++ b/SPMeta2/SPMeta2.Containers/DefinitionGenerators/SuiteBarDefinitionGenerator.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.ObjectModel; +using SPMeta2.Containers.Services.Base; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; +using SPMeta2.Containers.Services; +using SPMeta2.Enumerations; + +namespace SPMeta2.Containers.DefinitionGenerators +{ + public class SuiteBarDefinitionGenerator : TypedDefinitionGeneratorServiceBase + { + public override DefinitionBase GenerateRandomDefinition(Action action) + { + return WithEmptyDefinition(def => + { + def.SuiteBarBrandingElementHtml = Rnd.String(); + }); + } + } +} diff --git a/SPMeta2/SPMeta2.Containers/DefinitionGenerators/UserCustomActionDefinitionGenerator.cs b/SPMeta2/SPMeta2.Containers/DefinitionGenerators/UserCustomActionDefinitionGenerator.cs index 59cf2a76e..6b10d311e 100644 --- a/SPMeta2/SPMeta2.Containers/DefinitionGenerators/UserCustomActionDefinitionGenerator.cs +++ b/SPMeta2/SPMeta2.Containers/DefinitionGenerators/UserCustomActionDefinitionGenerator.cs @@ -1,23 +1,28 @@ -using System; -using SPMeta2.Containers.Services.Base; -using SPMeta2.Definitions; -using SPMeta2.Definitions.Base; - -namespace SPMeta2.Containers.DefinitionGenerators -{ - public class UserCustomActionDefinitionGenerator : TypedDefinitionGeneratorServiceBase - { - public override DefinitionBase GenerateRandomDefinition(Action action) - { - return WithEmptyDefinition(def => - { - def.Name = Rnd.String(); - def.Location = "ScriptLink"; - def.ScriptSrc = "~site/style library/spmeta2.js"; - def.Sequence = Rnd.Int(100); - def.Description = Rnd.String(); - def.Group = Rnd.String(); - }); - } - } -} +using System; +using SPMeta2.Containers.Services.Base; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; + +namespace SPMeta2.Containers.DefinitionGenerators +{ + public class UserCustomActionDefinitionGenerator : TypedDefinitionGeneratorServiceBase + { + public override DefinitionBase GenerateRandomDefinition(Action action) + { + return WithEmptyDefinition(def => + { + def.Name = Rnd.String(); + def.Location = "ScriptLink"; + def.ScriptSrc = "~site/style library/spmeta2.js"; + def.Sequence = Rnd.Int(100); + + def.Group = Rnd.String(); + + // Breaking change: UserCustomAction without Title/Description breaks Translation Export #937 + // https://github.com/SubPointSolutions/spmeta2/issues/937 + def.Title = Rnd.String(); + def.Description = Rnd.String(); + }); + } + } +} diff --git a/SPMeta2/SPMeta2.Containers/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers/Properties/AssemblyInfo.cs index c21723570..9f305a4e9 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.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj b/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj index 4f58668d6..27663caf9 100644 --- a/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj +++ b/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj @@ -116,6 +116,8 @@ True DefaultWebpartTemplates.resx + + @@ -343,6 +345,12 @@ Always + + Always + + + Always + Always diff --git a/SPMeta2/SPMeta2.Containers/Services/RegressionTestService.cs b/SPMeta2/SPMeta2.Containers/Services/RegressionTestService.cs index 31d174353..4898df148 100644 --- a/SPMeta2/SPMeta2.Containers/Services/RegressionTestService.cs +++ b/SPMeta2/SPMeta2.Containers/Services/RegressionTestService.cs @@ -124,7 +124,7 @@ protected virtual void InitConfig() private bool _hasInit = false; - public static string CurrentProvisionRunnerAsssmbly {get;set;} + public static string CurrentProvisionRunnerAsssmbly { get; set; } protected virtual void InitRunnerImplementations() { @@ -206,8 +206,15 @@ public void WithExcpectedExceptions(IEnumerable exceptionTypes, Action act } foreach (var allowedType in exceptionTypes) - if (targetExeption.GetType().IsAssignableFrom(allowedType)) + { + //if (targetExeption.GetType().IsAssignableFrom(allowedType)) + // we need a specific type matching to avoid missed excpetions + + // SPMeta2.Exceptions.SPMeta2UnsupportedModelHostException: model host should be ListModelHost/WebModelHost/SiteModelHost on deploy a model to a SiteCollection using the Feature Receiver (SSOM) #1035 + // https://github.com/SubPointSolutions/spmeta2/issues/1035 + if (targetExeption.GetType() == allowedType) isAllowedException = true; + } if (isAllowedException) { diff --git a/SPMeta2/SPMeta2.Nintex.CSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Nintex.CSOM/Properties/AssemblyInfo.cs index 66c39bb42..0f3786ef0 100644 --- a/SPMeta2/SPMeta2.Nintex.CSOM/Properties/AssemblyInfo.cs +++ b/SPMeta2/SPMeta2.Nintex.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.0.17104.0417")] +[assembly: AssemblyFileVersion("1.0.17191.0958")] diff --git a/SPMeta2/SPMeta2.Nintex.SSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Nintex.SSOM/Properties/AssemblyInfo.cs index 1ca1da521..4563909aa 100644 --- a/SPMeta2/SPMeta2.Nintex.SSOM/Properties/AssemblyInfo.cs +++ b/SPMeta2/SPMeta2.Nintex.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.0.17104.0417")] +[assembly: AssemblyFileVersion("1.0.17191.0958")] diff --git a/SPMeta2/SPMeta2.Nintex/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Nintex/Properties/AssemblyInfo.cs index f6ac5aa03..68e52f100 100644 --- a/SPMeta2/SPMeta2.Nintex/Properties/AssemblyInfo.cs +++ b/SPMeta2/SPMeta2.Nintex/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.0.17104.0417")] +[assembly: AssemblyFileVersion("1.0.17191.0958")] diff --git a/SPMeta2/SPMeta2.O365/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.O365/Properties/AssemblyInfo.cs index afd37ea9e..ca6390b64 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.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2.Regression.CSOM.Standard/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.CSOM.Standard/Properties/AssemblyInfo.cs index bc7d8d532..628ac7b7f 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.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2.Regression.CSOM.Standard/Validation/Fields/ClientTaxonomyFieldDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM.Standard/Validation/Fields/ClientTaxonomyFieldDefinitionValidator.cs index d94be0b5a..be15d40c9 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM.Standard/Validation/Fields/ClientTaxonomyFieldDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM.Standard/Validation/Fields/ClientTaxonomyFieldDefinitionValidator.cs @@ -319,7 +319,12 @@ public override void DeployModel(object modelHost, DefinitionBase model) // etc assert.SkipProperty(m => m.TermLCID, "TermLCID. Skipping property."); - assert.SkipProperty(m => m.TermSetLCID, "TermSetLCID. Skipping property."); + assert.SkipProperty(m => m.TermSetLCID, "TermSetLCID. Skipping property."); + + if (definition.UserCreated.HasValue) + assert.ShouldBeEqual(m => m.UserCreated, o => o.UserCreated); + else + assert.SkipProperty(m => m.UserCreated, "UserCreated is null. Skipping property."); } #endregion diff --git a/SPMeta2/SPMeta2.Regression.CSOM.Standard/Validation/Webparts/ContentByQueryWebPartDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM.Standard/Validation/Webparts/ContentByQueryWebPartDefinitionValidator.cs index b6a9b62b6..c26ebba29 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM.Standard/Validation/Webparts/ContentByQueryWebPartDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM.Standard/Validation/Webparts/ContentByQueryWebPartDefinitionValidator.cs @@ -514,7 +514,8 @@ public override void DeployModel(object modelHost, DefinitionBase model) var targetWeb = webLookup.GetTargetWeb(listItemModelHost.HostSite, typedDefinition.WebUrl, - typedDefinition.WebId); + typedDefinition.WebId, + modelHost); var list = targetWeb.QueryAndGetListByUrl(typedDefinition.ListUrl); isValid = CurrentWebPartXml.GetListGuid() == list.Id.ToString("D"); diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.CSOM/Properties/AssemblyInfo.cs index f8c7b3998..de35e6b29 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.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2.Regression.CSOM/SPMeta2.Regression.CSOM.csproj b/SPMeta2/SPMeta2.Regression.CSOM/SPMeta2.Regression.CSOM.csproj index c67580285..6d142d158 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/SPMeta2.Regression.CSOM.csproj +++ b/SPMeta2/SPMeta2.Regression.CSOM/SPMeta2.Regression.CSOM.csproj @@ -27,7 +27,6 @@ - bin\Debug45-$(spRuntime)\ v4.5 @@ -40,7 +39,6 @@ false bin\Debug45-$(spRuntime)\SPMeta2.Regression.CSOM.XML - ..\..\packages\CsQuery.1.3.4\lib\net40\CsQuery.dll diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientContentTypeLinkDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientContentTypeLinkDefinitionValidator.cs index 7982e44b5..5ef033903 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientContentTypeLinkDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientContentTypeLinkDefinitionValidator.cs @@ -22,8 +22,14 @@ public override void DeployModel(object modelHost, DefinitionBase model) var list = listModelHost.HostList; var context = list.Context; - context.Load(list, l => l.ContentTypesEnabled); - context.Load(list, l => l.ContentTypes); + context.Load(list, l => l.ContentTypesEnabled); + context.Load(list, l => l.ContentTypes.Include( + ct => ct.Id, + ct => ct.StringId, + ct => ct.Name, + + ct => ct.Parent.Id, + ct => ct.Parent.StringId)); context.ExecuteQueryWithTrace(); diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientFieldDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientFieldDefinitionValidator.cs index 06f20e63c..7793aece9 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientFieldDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientFieldDefinitionValidator.cs @@ -9,6 +9,7 @@ using SPMeta2.Regression.CSOM.Utils; using SPMeta2.Services; using SPMeta2.Utils; +using SPMeta2.Definitions.Fields; namespace SPMeta2.Regression.CSOM.Validation @@ -62,6 +63,47 @@ protected void ValidateField(AssertPair assert, Field sp assert.ShouldBeEqualIfNotNullOrEmpty(m => m.Group, o => o.Group); assert.ShouldBeEqualIfNotNullOrEmpty(m => m.StaticName, o => o.StaticName); + if (definition is LookupFieldDefinition) + { + var depLookupDefinition = definition as LookupFieldDefinition; + + // cjeck against CountRelated for lookups + if (depLookupDefinition.CountRelated.HasValue + && depLookupDefinition.ReadOnlyField.HasValue) + { + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.ReadOnlyField); + + var isValid = (bool)srcProp.Value == depLookupDefinition.CountRelated.Value; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + assert.SkipProperty(m => m.ReadOnlyField, "CountRelated / ReadOnlyField is null or empty"); + + //if (definition.ReadOnlyField.HasValue) + // assert.ShouldBeEqual(m => m.ReadOnlyField, o => o.ReadOnlyField); + //else + // assert.SkipProperty(m => m.ReadOnlyField, "ReadOnlyField is null or empty"); + } + } + else + { + if (definition.ReadOnlyField.HasValue) + assert.ShouldBeEqual(m => m.ReadOnlyField, o => o.ReadOnlyField); + else + assert.SkipProperty(m => m.ReadOnlyField, "ReadOnlyField is null or empty"); + } + assert.SkipProperty(m => m.DefaultFormula, "Not supported in CSOM API yet"); if (!string.IsNullOrEmpty(definition.DefaultFormula)) @@ -267,7 +309,14 @@ protected void ValidateField(AssertPair assert, Field sp assert.ShouldBeEqualIfHasValue(m => m.ShowInVersionHistory, o => o.GetShowInVersionHistory()); assert.ShouldBeEqualIfHasValue(m => m.ShowInViewForms, o => o.GetShowInViewForms()); - assert.ShouldBeEqual(m => m.Indexed, o => o.Indexed); + if (definition is DependentLookupFieldDefinition) + { + assert.SkipProperty(m => m.Indexed, "Skipping Indexed prop for DependentLookupFieldDefinition"); + } + else + { + assert.ShouldBeEqual(m => m.Indexed, o => o.Indexed); + } assert.ShouldBeEqualIfHasValue(m => m.AllowDeletion, o => o.GetAllowDeletion()); diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientListDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientListDefinitionValidator.cs index db15188c9..3ab28cf30 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientListDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientListDefinitionValidator.cs @@ -1,459 +1,460 @@ -using System; -using System.Linq; - -using Microsoft.SharePoint.Client; - -using SPMeta2.Containers.Assertion; -using SPMeta2.CSOM.DefaultSyntax; -using SPMeta2.CSOM.Extensions; -using SPMeta2.CSOM.ModelHandlers; -using SPMeta2.CSOM.ModelHosts; -using SPMeta2.Definitions; -using SPMeta2.Services; -using SPMeta2.Utils; -using System.Text; - -namespace SPMeta2.Regression.CSOM.Validation -{ - public class ClientListDefinitionValidator : ListModelHandler - { - 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 web = webModelHost.HostWeb; - var context = web.Context; - - context.Load(web, w => w.ServerRelativeUrl); - - var lists = context.LoadQuery(web.Lists.Include(l => l.DefaultViewUrl)); - context.ExecuteQueryWithTrace(); - -#pragma warning disable 618 - var spObject = FindListByUrl(lists, definition.GetListUrl()); -#pragma warning restore 618 - - context.Load(spObject); - context.Load(spObject, list => list.RootFolder.Properties); - context.Load(spObject, list => list.RootFolder.ServerRelativeUrl); - context.Load(spObject, list => list.RootFolder.Properties); - context.Load(spObject, list => list.EnableAttachments); - context.Load(spObject, list => list.EnableFolderCreation); - context.Load(spObject, list => list.EnableMinorVersions); - context.Load(spObject, list => list.EnableModeration); - context.Load(spObject, list => list.EnableVersioning); - context.Load(spObject, list => list.ForceCheckout); - context.Load(spObject, list => list.Hidden); - context.Load(spObject, list => list.NoCrawl); - context.Load(spObject, list => list.OnQuickLaunch); - context.Load(spObject, list => list.DocumentTemplateUrl); - context.Load(spObject, list => list.DraftVersionVisibility); - - context.ExecuteQueryWithTrace(); - - var assert = ServiceFactory.AssertService.NewAssert(model, definition, spObject); - - assert - .ShouldBeEqual(m => m.Title, o => o.Title) - //.ShouldBeEqual(m => m.Description, o => o.Description) - //.ShouldBeEqual(m => m.IrmEnabled, o => o.IrmEnabled) - //.ShouldBeEqual(m => m.IrmExpire, o => o.IrmExpire) - //.ShouldBeEqual(m => m.IrmReject, o => o.IrmReject) - //.ShouldBeEndOf(m => m.GetServerRelativeUrl(web), m => m.Url, o => o.GetServerRelativeUrl(), o => o.GetServerRelativeUrl()) - .ShouldBeEqual(m => m.ContentTypesEnabled, o => o.ContentTypesEnabled); - - - if (!string.IsNullOrEmpty(definition.Description)) - assert.ShouldBeEqual(m => m.Description, o => o.Description); - else - assert.SkipProperty(m => m.Description, "Description is null or empty. Skipping."); - +using System; +using System.Linq; + +using Microsoft.SharePoint.Client; + +using SPMeta2.Containers.Assertion; +using SPMeta2.CSOM.DefaultSyntax; +using SPMeta2.CSOM.Extensions; +using SPMeta2.CSOM.ModelHandlers; +using SPMeta2.CSOM.ModelHosts; +using SPMeta2.Definitions; +using SPMeta2.Services; +using SPMeta2.Utils; +using System.Text; + +namespace SPMeta2.Regression.CSOM.Validation +{ + public class ClientListDefinitionValidator : ListModelHandler + { + 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 web = webModelHost.HostWeb; + var context = web.Context; + + context.Load(web, w => w.ServerRelativeUrl); + + var lists = context.LoadQuery(web.Lists.Include(l => l.DefaultViewUrl)); + context.ExecuteQueryWithTrace(); + +#pragma warning disable 618 + var spObject = FindListByUrl(lists, definition.GetListUrl()); +#pragma warning restore 618 + + context.Load(spObject); + context.Load(spObject, list => list.RootFolder.Properties); + context.Load(spObject, list => list.RootFolder.ServerRelativeUrl); + context.Load(spObject, list => list.RootFolder.Properties); + context.Load(spObject, list => list.EnableAttachments); + context.Load(spObject, list => list.EnableFolderCreation); + context.Load(spObject, list => list.EnableMinorVersions); + context.Load(spObject, list => list.EnableModeration); + context.Load(spObject, list => list.EnableVersioning); + context.Load(spObject, list => list.ForceCheckout); + context.Load(spObject, list => list.Hidden); + context.Load(spObject, list => list.NoCrawl); + context.Load(spObject, list => list.OnQuickLaunch); + context.Load(spObject, list => list.DocumentTemplateUrl); + context.Load(spObject, list => list.DraftVersionVisibility); + + context.ExecuteQueryWithTrace(); + + var assert = ServiceFactory.AssertService.NewAssert(model, definition, spObject); + + assert + .ShouldBeEqual(m => m.Title, o => o.Title) + //.ShouldBeEqual(m => m.Description, o => o.Description) + //.ShouldBeEqual(m => m.IrmEnabled, o => o.IrmEnabled) + //.ShouldBeEqual(m => m.IrmExpire, o => o.IrmExpire) + //.ShouldBeEqual(m => m.IrmReject, o => o.IrmReject) + //.ShouldBeEndOf(m => m.GetServerRelativeUrl(web), m => m.Url, o => o.GetServerRelativeUrl(), o => o.GetServerRelativeUrl()) + .ShouldBeEqual(m => m.ContentTypesEnabled, o => o.ContentTypesEnabled); + + + if (!string.IsNullOrEmpty(definition.Description)) + assert.ShouldBeEqual(m => m.Description, o => o.Description); + else + assert.SkipProperty(m => m.Description, "Description is null or empty. Skipping."); + + assert.SkipProperty(m => m.EnableAssignToEmail, "EnableAssignToEmail is not supported by CSOM"); assert.SkipProperty(m => m.WriteSecurity, "WriteSecurity is not supported by CSOM"); - assert.SkipProperty(m => m.NavigateForFormsPages, "NavigateForFormsPages is not supported by CSOM"); - - if (!string.IsNullOrEmpty(definition.DraftVersionVisibility)) - { - var draftOption = (DraftVisibilityType)Enum.Parse(typeof(DraftVisibilityType), definition.DraftVersionVisibility); - - assert.ShouldBeEqual((p, s, d) => - { - var srcProp = s.GetExpressionValue(m => m.DraftVersionVisibility); - var dstProp = d.GetExpressionValue(m => m.DraftVersionVisibility); - - return new PropertyValidationResult - { - Tag = p.Tag, - Src = srcProp, - Dst = null, - IsValid = draftOption == (DraftVisibilityType)dstProp.Value - }; - }); - } - else - { - assert.SkipProperty(m => m.DraftVersionVisibility, "Skipping from validation. DraftVersionVisibility IS NULL"); - } - - if (definition.Hidden.HasValue) - assert.ShouldBeEqual(m => m.Hidden, m => m.Hidden); - else - assert.SkipProperty(m => m.Hidden, "Skipping from validation. Url IS NULL"); - -#pragma warning disable 618 - if (!string.IsNullOrEmpty(definition.Url)) - assert.ShouldBeEndOf(m => m.GetListUrl(), m => m.Url, o => o.GetServerRelativeUrl(), o => o.GetServerRelativeUrl()); - else - assert.SkipProperty(m => m.Url, "Skipping from validation. Url IS NULL"); -#pragma warning restore 618 - - if (!string.IsNullOrEmpty(definition.CustomUrl)) - assert.ShouldBeEndOf(m => m.CustomUrl, o => o.GetServerRelativeUrl()); - else - assert.SkipProperty(m => m.CustomUrl, "Skipping from validation. CustomUrl IS NULL"); - - // common - if (definition.EnableAttachments.HasValue) - assert.ShouldBeEqual(m => m.EnableAttachments, o => o.EnableAttachments); - else - assert.SkipProperty(m => m.EnableAttachments, "Skipping from validation. EnableAttachments IS NULL"); - - if (definition.EnableFolderCreation.HasValue) - assert.ShouldBeEqual(m => m.EnableFolderCreation, o => o.EnableFolderCreation); - else - assert.SkipProperty(m => m.EnableFolderCreation, "Skipping from validation. EnableFolderCreation IS NULL"); - - if (definition.EnableMinorVersions.HasValue) - assert.ShouldBeEqual(m => m.EnableMinorVersions, o => o.EnableMinorVersions); - else - assert.SkipProperty(m => m.EnableMinorVersions, "Skipping from validation. EnableMinorVersions IS NULL"); - - if (definition.EnableModeration.HasValue) - assert.ShouldBeEqual(m => m.EnableModeration, o => o.EnableModeration); - else - assert.SkipProperty(m => m.EnableModeration, "Skipping from validation. EnableModeration IS NULL"); - - if (definition.EnableVersioning.HasValue) - assert.ShouldBeEqual(m => m.EnableVersioning, o => o.EnableVersioning); - else - assert.SkipProperty(m => m.EnableVersioning, "Skipping from validation. EnableVersioning IS NULL"); - - if (definition.ForceCheckout.HasValue) - assert.ShouldBeEqual(m => m.ForceCheckout, o => o.ForceCheckout); - else - assert.SkipProperty(m => m.ForceCheckout, "Skipping from validation. ForceCheckout IS NULL"); - - if (definition.NoCrawl.HasValue) - assert.ShouldBeEqual(m => m.NoCrawl, o => o.NoCrawl); - else - assert.SkipProperty(m => m.NoCrawl, "Skipping from validation. NoCrawl IS NULL"); - - - if (definition.OnQuickLaunch.HasValue) - assert.ShouldBeEqual(m => m.OnQuickLaunch, o => o.OnQuickLaunch); - else - assert.SkipProperty(m => m.OnQuickLaunch, "Skipping from validation. OnQuickLaunch IS NULL"); - - - // IRM - if (definition.IrmEnabled.HasValue) - assert.ShouldBeEqual(m => m.IrmEnabled, o => o.IrmEnabled); - else - assert.SkipProperty(m => m.IrmEnabled, "Skipping from validation. IrmEnabled IS NULL"); - - if (definition.IrmExpire.HasValue) - assert.ShouldBeEqual(m => m.IrmExpire, o => o.IrmExpire); - else - assert.SkipProperty(m => m.IrmExpire, "Skipping from validation. IrmExpire IS NULL"); - - if (definition.IrmReject.HasValue) - assert.ShouldBeEqual(m => m.IrmReject, o => o.IrmReject); - else - assert.SkipProperty(m => m.IrmReject, "Skipping from validation. IrmReject IS NULL"); - - if (definition.TemplateType > 0) - { - assert.ShouldBeEqual(m => m.TemplateType, o => o.BaseTemplate); - } - else - { - assert.SkipProperty(m => m.TemplateType, "TemplateType == 0. Skipping."); - } - - if (!string.IsNullOrEmpty(definition.TemplateName)) - { - context.Load(web, tmpWeb => tmpWeb.ListTemplates); - context.ExecuteQueryWithTrace(); - - TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "Fetching all list templates and matching target one."); - var listTemplate = ResolveListTemplate(webModelHost, definition); - - assert.ShouldBeEqual((p, s, d) => - { - var srcProp = s.GetExpressionValue(m => m.TemplateName); - - return new PropertyValidationResult - { - Tag = p.Tag, - Src = srcProp, - Dst = null, - IsValid = - (spObject.TemplateFeatureId == listTemplate.FeatureId) && - (spObject.BaseTemplate == listTemplate.ListTemplateTypeKind) - }; - }); - } - else - { - assert.SkipProperty(m => m.TemplateName, "TemplateName is null or empty. Skipping."); - } - - if (definition.MajorVersionLimit.HasValue) - { - if (ReflectionUtils.HasProperty(spObject, "MajorVersionLimit")) - { - assert.ShouldBeEqual((p, s, d) => - { - var srcProp = s.GetExpressionValue(def => def.MajorVersionLimit); - var value = (int)ReflectionUtils.GetPropertyValue(spObject, "MajorVersionLimit"); - - var isValid = value == definition.MajorVersionLimit.Value; - - return new PropertyValidationResult - { - Tag = p.Tag, - Src = srcProp, - Dst = null, - IsValid = isValid - }; - }); - } - else - { - assert.SkipProperty(m => m.MajorVersionLimit, "Skipping from validation. MajorVersionLimit does not exist. CSOM runtime is below required."); - } - } - else - assert.SkipProperty(m => m.MajorVersionLimit, "Skipping from validation. MajorVersionLimit IS NULL"); - - if (definition.MajorWithMinorVersionsLimit.HasValue) - { - if (ReflectionUtils.HasProperty(spObject, "MajorWithMinorVersionsLimit")) - { - assert.ShouldBeEqual((p, s, d) => - { - var srcProp = s.GetExpressionValue(def => def.MajorWithMinorVersionsLimit); - var value = (int)ReflectionUtils.GetPropertyValue(spObject, "MajorWithMinorVersionsLimit"); - - var isValid = value == definition.MajorWithMinorVersionsLimit.Value; - - return new PropertyValidationResult - { - Tag = p.Tag, - Src = srcProp, - Dst = null, - IsValid = isValid - }; - }); - } - else - { - assert.SkipProperty(m => m.MajorWithMinorVersionsLimit, "Skipping from validation. MajorWithMinorVersionsLimit does not exist. CSOM runtime is below required."); - } - } - else - assert.SkipProperty(m => m.MajorWithMinorVersionsLimit, - "Skipping from validation. MajorWithMinorVersionsLimit IS NULL"); - - // template url - if (string.IsNullOrEmpty(definition.DocumentTemplateUrl)) - { - assert.SkipProperty(m => m.DocumentTemplateUrl, "Skipping DocumentTemplateUrl or library. Skipping."); - } - else - { - assert.ShouldBeEqual((p, s, d) => - { - var srcProp = s.GetExpressionValue(def => def.DocumentTemplateUrl); - var dstProp = d.DocumentTemplateUrl; - - var srcUrl = srcProp.Value as string; - var dstUrl = dstProp; - - if (!dstUrl.StartsWith("/")) - dstUrl = "/" + dstUrl; - - bool isValid; - - if (s.DocumentTemplateUrl.Contains("~sitecollection")) - { - var siteCollectionUrl = webModelHost.HostSite.ServerRelativeUrl == "/" ? - string.Empty : webModelHost.HostSite.ServerRelativeUrl; - - isValid = srcUrl.Replace("~sitecollection", siteCollectionUrl) == dstUrl; - } - else if (s.DocumentTemplateUrl.Contains("~site")) - { - var siteCollectionUrl = web.ServerRelativeUrl == "/" ? string.Empty : web.ServerRelativeUrl; - - isValid = srcUrl.Replace("~site", siteCollectionUrl) == dstUrl; - } - else - { - isValid = dstUrl.EndsWith(srcUrl); - } - - return new PropertyValidationResult - { - Tag = p.Tag, - Src = srcProp, - Dst = null, - IsValid = isValid - }; - }); - } - - if (definition.IndexedRootFolderPropertyKeys.Any()) - { - assert.ShouldBeEqual((p, s, d) => - { - var srcProp = s.GetExpressionValue(def => def.IndexedRootFolderPropertyKeys); - - var isValid = false; - - if (d.RootFolder.Properties.FieldValues.ContainsKey("vti_indexedpropertykeys")) - { - // check props, TODO - - // check vti_indexedpropertykeys - var indexedPropertyKeys = d.RootFolder.Properties["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.IndexedRootFolderPropertyKeys.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.IndexedRootFolderPropertyKeys, "IndexedRootFolderPropertyKeys is NULL or empty. Skipping."); - + assert.SkipProperty(m => m.NavigateForFormsPages, "NavigateForFormsPages is not supported by CSOM"); + + if (!string.IsNullOrEmpty(definition.DraftVersionVisibility)) + { + var draftOption = (DraftVisibilityType)Enum.Parse(typeof(DraftVisibilityType), definition.DraftVersionVisibility); + + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.DraftVersionVisibility); + var dstProp = d.GetExpressionValue(m => m.DraftVersionVisibility); + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = draftOption == (DraftVisibilityType)dstProp.Value + }; + }); + } + else + { + assert.SkipProperty(m => m.DraftVersionVisibility, "Skipping from validation. DraftVersionVisibility IS NULL"); + } + + if (definition.Hidden.HasValue) + assert.ShouldBeEqual(m => m.Hidden, m => m.Hidden); + else + assert.SkipProperty(m => m.Hidden, "Skipping from validation. Url IS NULL"); + +#pragma warning disable 618 + if (!string.IsNullOrEmpty(definition.Url)) + assert.ShouldBeEndOf(m => m.GetListUrl(), m => m.Url, o => o.GetServerRelativeUrl(), o => o.GetServerRelativeUrl()); + else + assert.SkipProperty(m => m.Url, "Skipping from validation. Url IS NULL"); +#pragma warning restore 618 + + if (!string.IsNullOrEmpty(definition.CustomUrl)) + assert.ShouldBeEndOf(m => m.CustomUrl, o => o.GetServerRelativeUrl()); + else + assert.SkipProperty(m => m.CustomUrl, "Skipping from validation. CustomUrl IS NULL"); + + // common + if (definition.EnableAttachments.HasValue) + assert.ShouldBeEqual(m => m.EnableAttachments, o => o.EnableAttachments); + else + assert.SkipProperty(m => m.EnableAttachments, "Skipping from validation. EnableAttachments IS NULL"); + + if (definition.EnableFolderCreation.HasValue) + assert.ShouldBeEqual(m => m.EnableFolderCreation, o => o.EnableFolderCreation); + else + assert.SkipProperty(m => m.EnableFolderCreation, "Skipping from validation. EnableFolderCreation IS NULL"); + + if (definition.EnableMinorVersions.HasValue) + assert.ShouldBeEqual(m => m.EnableMinorVersions, o => o.EnableMinorVersions); + else + assert.SkipProperty(m => m.EnableMinorVersions, "Skipping from validation. EnableMinorVersions IS NULL"); + + if (definition.EnableModeration.HasValue) + assert.ShouldBeEqual(m => m.EnableModeration, o => o.EnableModeration); + else + assert.SkipProperty(m => m.EnableModeration, "Skipping from validation. EnableModeration IS NULL"); + + if (definition.EnableVersioning.HasValue) + assert.ShouldBeEqual(m => m.EnableVersioning, o => o.EnableVersioning); + else + assert.SkipProperty(m => m.EnableVersioning, "Skipping from validation. EnableVersioning IS NULL"); + + if (definition.ForceCheckout.HasValue) + assert.ShouldBeEqual(m => m.ForceCheckout, o => o.ForceCheckout); + else + assert.SkipProperty(m => m.ForceCheckout, "Skipping from validation. ForceCheckout IS NULL"); + + if (definition.NoCrawl.HasValue) + assert.ShouldBeEqual(m => m.NoCrawl, o => o.NoCrawl); + else + assert.SkipProperty(m => m.NoCrawl, "Skipping from validation. NoCrawl IS NULL"); + + + if (definition.OnQuickLaunch.HasValue) + assert.ShouldBeEqual(m => m.OnQuickLaunch, o => o.OnQuickLaunch); + else + assert.SkipProperty(m => m.OnQuickLaunch, "Skipping from validation. OnQuickLaunch IS NULL"); + + + // IRM + if (definition.IrmEnabled.HasValue) + assert.ShouldBeEqual(m => m.IrmEnabled, o => o.IrmEnabled); + else + assert.SkipProperty(m => m.IrmEnabled, "Skipping from validation. IrmEnabled IS NULL"); + + if (definition.IrmExpire.HasValue) + assert.ShouldBeEqual(m => m.IrmExpire, o => o.IrmExpire); + else + assert.SkipProperty(m => m.IrmExpire, "Skipping from validation. IrmExpire IS NULL"); + + if (definition.IrmReject.HasValue) + assert.ShouldBeEqual(m => m.IrmReject, o => o.IrmReject); + else + assert.SkipProperty(m => m.IrmReject, "Skipping from validation. IrmReject IS NULL"); + + if (definition.TemplateType > 0) + { + assert.ShouldBeEqual(m => m.TemplateType, o => o.BaseTemplate); + } + else + { + assert.SkipProperty(m => m.TemplateType, "TemplateType == 0. Skipping."); + } + + if (!string.IsNullOrEmpty(definition.TemplateName)) + { + context.Load(web, tmpWeb => tmpWeb.ListTemplates); + context.ExecuteQueryWithTrace(); + + TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "Fetching all list templates and matching target one."); + var listTemplate = ResolveListTemplate(webModelHost, definition); + + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.TemplateName); + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = + (spObject.TemplateFeatureId == listTemplate.FeatureId) && + (spObject.BaseTemplate == listTemplate.ListTemplateTypeKind) + }; + }); + } + else + { + assert.SkipProperty(m => m.TemplateName, "TemplateName is null or empty. Skipping."); + } + + if (definition.MajorVersionLimit.HasValue) + { + if (ReflectionUtils.HasProperty(spObject, "MajorVersionLimit")) + { + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(def => def.MajorVersionLimit); + var value = (int)ReflectionUtils.GetPropertyValue(spObject, "MajorVersionLimit"); + + var isValid = value == definition.MajorVersionLimit.Value; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + assert.SkipProperty(m => m.MajorVersionLimit, "Skipping from validation. MajorVersionLimit does not exist. CSOM runtime is below required."); + } + } + else + assert.SkipProperty(m => m.MajorVersionLimit, "Skipping from validation. MajorVersionLimit IS NULL"); + + if (definition.MajorWithMinorVersionsLimit.HasValue) + { + if (ReflectionUtils.HasProperty(spObject, "MajorWithMinorVersionsLimit")) + { + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(def => def.MajorWithMinorVersionsLimit); + var value = (int)ReflectionUtils.GetPropertyValue(spObject, "MajorWithMinorVersionsLimit"); + + var isValid = value == definition.MajorWithMinorVersionsLimit.Value; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + assert.SkipProperty(m => m.MajorWithMinorVersionsLimit, "Skipping from validation. MajorWithMinorVersionsLimit does not exist. CSOM runtime is below required."); + } + } + else + assert.SkipProperty(m => m.MajorWithMinorVersionsLimit, + "Skipping from validation. MajorWithMinorVersionsLimit IS NULL"); + + // template url + if (string.IsNullOrEmpty(definition.DocumentTemplateUrl)) + { + assert.SkipProperty(m => m.DocumentTemplateUrl, "Skipping DocumentTemplateUrl or library. Skipping."); + } + else + { + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(def => def.DocumentTemplateUrl); + var dstProp = d.DocumentTemplateUrl; + + var srcUrl = srcProp.Value as string; + var dstUrl = dstProp; + + if (!dstUrl.StartsWith("/")) + dstUrl = "/" + dstUrl; + + bool isValid; + + if (s.DocumentTemplateUrl.Contains("~sitecollection")) + { + var siteCollectionUrl = webModelHost.HostSite.ServerRelativeUrl == "/" ? + string.Empty : webModelHost.HostSite.ServerRelativeUrl; + + isValid = srcUrl.Replace("~sitecollection", siteCollectionUrl) == dstUrl; + } + else if (s.DocumentTemplateUrl.Contains("~site")) + { + var siteCollectionUrl = web.ServerRelativeUrl == "/" ? string.Empty : web.ServerRelativeUrl; + + isValid = srcUrl.Replace("~site", siteCollectionUrl) == dstUrl; + } + else + { + isValid = dstUrl.EndsWith(srcUrl); + } + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + + if (definition.IndexedRootFolderPropertyKeys.Any()) + { + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(def => def.IndexedRootFolderPropertyKeys); + + var isValid = false; + + if (d.RootFolder.Properties.FieldValues.ContainsKey("vti_indexedpropertykeys")) + { + // check props, TODO + + // check vti_indexedpropertykeys + var indexedPropertyKeys = d.RootFolder.Properties["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.IndexedRootFolderPropertyKeys.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.IndexedRootFolderPropertyKeys, "IndexedRootFolderPropertyKeys 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."); - } - } - } - - public static class Ex - { - public static string GetServerRelativeUrl(this ListDefinition listDef, Web web) - { -#pragma warning disable 618 - return UrlUtility.CombineUrl(web.ServerRelativeUrl, listDef.GetListUrl()); -#pragma warning restore 618 - } - - public static string GetServerRelativeUrl(this List list) - { - return list.RootFolder.ServerRelativeUrl; - } - } -} + }); + + 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."); + } + } + } + + public static class Ex + { + public static string GetServerRelativeUrl(this ListDefinition listDef, Web web) + { +#pragma warning disable 618 + return UrlUtility.CombineUrl(web.ServerRelativeUrl, listDef.GetListUrl()); +#pragma warning restore 618 + } + + public static string GetServerRelativeUrl(this List list) + { + return list.RootFolder.ServerRelativeUrl; + } + } +} diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientListViewDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientListViewDefinitionValidator.cs index f6723f957..bf3f93bf0 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientListViewDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientListViewDefinitionValidator.cs @@ -30,6 +30,7 @@ public override void DeployModel(object modelHost, DefinitionBase model) v => v.ViewFields, v => v.Title, v => v.DefaultView, + v => v.MobileDefaultView, v => v.ViewQuery, v => v.RowLimit, v => v.Paged, @@ -60,6 +61,12 @@ public override void DeployModel(object modelHost, DefinitionBase model) .ShouldBeEqual(m => m.RowLimit, o => (int)o.RowLimit) .ShouldBeEqual(m => m.IsPaged, o => o.Paged); + if (definition.MobileDefaultView.HasValue) + assert.ShouldBeEqual(m => m.MobileDefaultView, o => o.MobileDefaultView); + else + assert.SkipProperty(m => m.MobileDefaultView, "MobileDefaultView is null or empty. Skipping."); + + if (!string.IsNullOrEmpty(definition.Scope)) { assert.ShouldBeEqual((p, s, d) => @@ -99,6 +106,9 @@ public override void DeployModel(object modelHost, DefinitionBase model) srcViewDate = Regex.Replace(srcViewDate, @"\r\n?|\n", string.Empty); dstViewDate = Regex.Replace(dstViewDate, @"\r\n?|\n", string.Empty); + srcViewDate = Regex.Replace(srcViewDate, @"\s+", string.Empty); + dstViewDate = Regex.Replace(dstViewDate, @"\s+", string.Empty); + var isValid = srcViewDate.ToUpper() == dstViewDate.ToUpper(); return new PropertyValidationResult @@ -209,6 +219,9 @@ public override void DeployModel(object modelHost, DefinitionBase model) srcViewDate = Regex.Replace(srcViewDate, @"\r\n?|\n", string.Empty); dstViewDate = Regex.Replace(dstViewDate, @"\r\n?|\n", string.Empty); + srcViewDate = Regex.Replace(srcViewDate, @"\s+", string.Empty); + dstViewDate = Regex.Replace(dstViewDate, @"\s+", string.Empty); + var isValid = srcViewDate.ToUpper() == dstViewDate.ToUpper(); return new PropertyValidationResult diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSecurityRoleDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSecurityRoleDefinitionValidator.cs index 457bb0595..c49b4761c 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSecurityRoleDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSecurityRoleDefinitionValidator.cs @@ -24,11 +24,15 @@ public override void DeployModel(object modelHost, DefinitionBase model) context.Load(web, tmpWeb => tmpWeb.SiteGroups); context.ExecuteQueryWithTrace(); - var spObject = FindRoleDefinition(web.RoleDefinitions, definition.Name); + var spObject = FindRoleDefinition(web.RoleDefinitions, definition.Name); + + context.Load(spObject); + context.ExecuteQueryWithTrace(); var assert = ServiceFactory.AssertService.NewAssert(definition, spObject); - assert + assert + .ShouldNotBeNull(spObject) .ShouldBeEqual(m => m.Name, o => o.Name) .ShouldBeEqualIfNotNullOrEmpty(m => m.Description, o => o.Description) diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSecurityRoleLinkDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSecurityRoleLinkDefinitionValidator.cs index c23ca2b2b..d17586592 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSecurityRoleLinkDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientSecurityRoleLinkDefinitionValidator.cs @@ -1,34 +1,37 @@ -using System.Linq; -using Microsoft.SharePoint.Client; -using SPMeta2.Containers.Assertion; -using SPMeta2.Containers.Extensions; -using SPMeta2.CSOM.Extensions; -using SPMeta2.CSOM.ModelHandlers; -using SPMeta2.CSOM.ModelHosts; -using SPMeta2.Definitions; -using SPMeta2.Exceptions; -using SPMeta2.Utils; - -namespace SPMeta2.Regression.CSOM.Validation -{ - public class ClientSecurityRoleLinkDefinitionValidator : SecurityRoleLinkModelHandler - { - public override void DeployModel(object modelHost, DefinitionBase model) - { - var securityGroupModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); - var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - - var securableObject = securityGroupModelHost.SecurableObject; - var securityGroup = securityGroupModelHost.SecurityGroup; - var securityRole = ResolveSecurityRole(ExtractWeb(securableObject), definition); - - var securityRoleContext = securityRole.Context; - securityRoleContext.Load(securityRole); - securityRoleContext.ExecuteQueryWithTrace(); - +using System.Linq; +using Microsoft.SharePoint.Client; +using SPMeta2.Containers.Assertion; +using SPMeta2.Containers.Extensions; +using SPMeta2.CSOM.Extensions; +using SPMeta2.CSOM.ModelHandlers; +using SPMeta2.CSOM.ModelHosts; +using SPMeta2.Definitions; +using SPMeta2.Exceptions; +using SPMeta2.Utils; + +namespace SPMeta2.Regression.CSOM.Validation +{ + public class ClientSecurityRoleLinkDefinitionValidator : SecurityRoleLinkModelHandler + { + public override void DeployModel(object modelHost, DefinitionBase model) + { + var securityGroupModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + var securableObject = securityGroupModelHost.SecurableObject; + var securityGroup = securityGroupModelHost.SecurityGroup; + var securityRole = ResolveSecurityRole(ExtractWeb(securableObject), definition); + + var securityRoleContext = securityRole.Context; + securityRoleContext.Load(securityRole); + securityRoleContext.ExecuteQueryWithTrace(); + var roleAssignments = securableObject.RoleAssignments; - var spObject = roleAssignments - .OfType() + + securityRoleContext.Load(roleAssignments, d => d.Include(c => c.Member)); + securityRoleContext.ExecuteQueryWithTrace(); + + var spObject = roleAssignments.ToArray() .FirstOrDefault(r => r.Member.Id == securityGroup.Id); @@ -38,89 +41,89 @@ public override void DeployModel(object modelHost, DefinitionBase model) { throw new SPMeta2Exception("There must be only one RoleAssignments. RegIsMustBeSingleItem() == true"); } - } - - var context = spObject.Context; - context.Load(spObject, o => o.RoleDefinitionBindings); - context.ExecuteQueryWithTrace(); - - var assert = ServiceFactory.AssertService.NewAssert(definition, spObject); - - assert - .ShouldNotBeNull(spObject); - - if (!string.IsNullOrEmpty(definition.SecurityRoleName)) - { - assert.ShouldBeEqual((p, s, d) => - { - var srcProp = s.GetExpressionValue(m => m.SecurityRoleName); - var dstProp = d.GetExpressionValue(o => o.RoleDefinitionBindings.ToString()); - - var hasRoleDefinitionBinding = spObject.RoleDefinitionBindings - .FirstOrDefault(b => b.Id == securityRole.Id) != null; - - return new PropertyValidationResult - { - Tag = p.Tag, - Src = srcProp, - Dst = dstProp, - IsValid = hasRoleDefinitionBinding - }; - }); - } - else - { - assert.SkipProperty(m => m.SecurityRoleName, "SecurityRoleName is null or empty. Skipping."); - } - - if (!string.IsNullOrEmpty(definition.SecurityRoleType)) - { - assert.ShouldBeEqual((p, s, d) => - { - var srcProp = s.GetExpressionValue(m => m.SecurityRoleType); - var dstProp = d.GetExpressionValue(o => o.RoleDefinitionBindings.ToString()); - - var hasRoleDefinitionBinding = spObject.RoleDefinitionBindings - .FirstOrDefault(b => b.Id == securityRole.Id) != null; - - return new PropertyValidationResult - { - Tag = p.Tag, - Src = srcProp, - Dst = dstProp, - IsValid = hasRoleDefinitionBinding - }; - }); - - } - else - { - assert.SkipProperty(m => m.SecurityRoleType, "SecurityRoleType is null or empty. Skipping."); - } - - if (definition.SecurityRoleId > 0) - { - assert.ShouldBeEqual((p, s, d) => - { - var srcProp = s.GetExpressionValue(m => m.SecurityRoleId); - var dstProp = d.GetExpressionValue(o => o.RoleDefinitionBindings.ToString()); - - var hasRoleDefinitionBinding = spObject.RoleDefinitionBindings - .FirstOrDefault(b => b.Id == securityRole.Id) != null; - - return new PropertyValidationResult - { - Tag = p.Tag, - Src = srcProp, - Dst = dstProp, - IsValid = hasRoleDefinitionBinding - }; - }); - } - else - { - assert.SkipProperty(m => m.SecurityRoleId, "SecurityRoleId == 0. Skipping."); - } - } - } -} + } + + var context = spObject.Context; + context.Load(spObject, o => o.RoleDefinitionBindings); + context.ExecuteQueryWithTrace(); + + var assert = ServiceFactory.AssertService.NewAssert(definition, spObject); + + assert + .ShouldNotBeNull(spObject); + + if (!string.IsNullOrEmpty(definition.SecurityRoleName)) + { + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.SecurityRoleName); + var dstProp = d.GetExpressionValue(o => o.RoleDefinitionBindings.ToString()); + + var hasRoleDefinitionBinding = spObject.RoleDefinitionBindings + .FirstOrDefault(b => b.Id == securityRole.Id) != null; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = dstProp, + IsValid = hasRoleDefinitionBinding + }; + }); + } + else + { + assert.SkipProperty(m => m.SecurityRoleName, "SecurityRoleName is null or empty. Skipping."); + } + + if (!string.IsNullOrEmpty(definition.SecurityRoleType)) + { + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.SecurityRoleType); + var dstProp = d.GetExpressionValue(o => o.RoleDefinitionBindings.ToString()); + + var hasRoleDefinitionBinding = spObject.RoleDefinitionBindings + .FirstOrDefault(b => b.Id == securityRole.Id) != null; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = dstProp, + IsValid = hasRoleDefinitionBinding + }; + }); + + } + else + { + assert.SkipProperty(m => m.SecurityRoleType, "SecurityRoleType is null or empty. Skipping."); + } + + if (definition.SecurityRoleId > 0) + { + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.SecurityRoleId); + var dstProp = d.GetExpressionValue(o => o.RoleDefinitionBindings.ToString()); + + var hasRoleDefinitionBinding = spObject.RoleDefinitionBindings + .FirstOrDefault(b => b.Id == securityRole.Id) != null; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = dstProp, + IsValid = hasRoleDefinitionBinding + }; + }); + } + else + { + assert.SkipProperty(m => m.SecurityRoleId, "SecurityRoleId == 0. Skipping."); + } + } + } +} diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ContentTypes/HideContentTypeLinksDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ContentTypes/HideContentTypeLinksDefinitionValidator.cs index a73d91dfd..5cb18be5a 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ContentTypes/HideContentTypeLinksDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ContentTypes/HideContentTypeLinksDefinitionValidator.cs @@ -1,21 +1,91 @@ -using SPMeta2.CSOM.ModelHandlers.ContentTypes; -using SPMeta2.Definitions; -using SPMeta2.Definitions.Base; -using SPMeta2.Definitions.ContentTypes; -using SPMeta2.Utils; - -namespace SPMeta2.Regression.CSOM.Validation.ContentTypes -{ - public class HideContentTypeLinksDefinitionValidator : HideContentTypeLinksModelHandler - { - public override void DeployModel(object modelHost, DefinitionBase model) - { - var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - var spObject = ExtractFolderFromHost(modelHost); - - ServiceFactory.AssertService - .NewAssert(definition, spObject) - .ShouldNotBeNull(spObject); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.SharePoint.Client; +using SPMeta2.Containers.Assertion; +using SPMeta2.CSOM.ModelHandlers.ContentTypes; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; +using SPMeta2.Definitions.ContentTypes; +using SPMeta2.Utils; +using SPMeta2.CSOM.Extensions; + +namespace SPMeta2.Regression.CSOM.Validation.ContentTypes +{ + public class HideContentTypeLinksDefinitionValidator : HideContentTypeLinksModelHandler + { + public override void DeployModel(object modelHost, DefinitionBase model) + { + var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + var list = ExtractListFromHost(modelHost); + var spObject = ExtractFolderFromHost(modelHost); + + var context = spObject.Context; + + context.Load(list, l => l.ContentTypes.Include( + ct => ct.Id, + ct => ct.StringId, + ct => ct.Name, + ct => ct.ReadOnly, + + ct => ct.Parent.Id + )); + + context.Load(spObject, f => f.UniqueContentTypeOrder); + context.ExecuteQueryWithTrace(); + + var listContentTypes = list.ContentTypes; + var contentTypeOrder = spObject.UniqueContentTypeOrder; + + var assert = ServiceFactory.AssertService + .NewAssert(definition, spObject) + .ShouldNotBeNull(spObject) + .ShouldNotBeNull(list) + .ShouldNotBeNull(contentTypeOrder); + + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(def => def.ContentTypes); + var dstProp = d.GetExpressionValue(ct => ct.UniqueContentTypeOrder); + + var isValid = true; + + foreach (var srcContentTypeDef in s.ContentTypes) + { + var exists = false; + + if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeId)) + { + var spContentTypeId = srcContentTypeDef.ContentTypeId.ToUpper(); + var listContentType = contentTypeOrder.FirstOrDefault(c => c.StringValue.ToUpper().StartsWith(spContentTypeId)); + + exists = listContentType != null; + } + else if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeName)) + { + var spContentType = listContentTypes.FirstOrDefault(c => c.Name == srcContentTypeDef.ContentTypeName); + var spContentTypeId = spContentType.StringId.ToUpper(); + + var listContentType = contentTypeOrder.FirstOrDefault(c => c.StringValue.ToUpper().StartsWith(spContentTypeId)); + + exists = listContentType != null; + } + + if (exists) + { + isValid = false; + break; + } + } + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = dstProp, + IsValid = isValid + }; + }); + } + } +} diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ContentTypes/RemoveContentTypeLinksDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ContentTypes/RemoveContentTypeLinksDefinitionValidator.cs index 13ba57dfb..6e28394ae 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ContentTypes/RemoveContentTypeLinksDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ContentTypes/RemoveContentTypeLinksDefinitionValidator.cs @@ -1,21 +1,85 @@ -using SPMeta2.CSOM.ModelHandlers.ContentTypes; -using SPMeta2.Definitions; -using SPMeta2.Definitions.Base; -using SPMeta2.Definitions.ContentTypes; -using SPMeta2.Utils; - +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.SharePoint.Client; +using SPMeta2.Containers.Assertion; +using SPMeta2.CSOM.ModelHandlers.ContentTypes; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; +using SPMeta2.Definitions.ContentTypes; +using SPMeta2.Utils; +using SPMeta2.CSOM.Extensions; namespace SPMeta2.Regression.CSOM.Validation.ContentTypes { public class RemoveContentTypeLinksDefinitionValidator : RemoveContentTypeLinksModelHandler { public override void DeployModel(object modelHost, DefinitionBase model) { - var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - var spObject = ExtractListFromHost(modelHost); - - ServiceFactory.AssertService - .NewAssert(definition, spObject) - .ShouldNotBeNull(spObject); + var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + var list = ExtractListFromHost(modelHost); + var spObject = ExtractFolderFromHost(modelHost); + + var context = spObject.Context; + + context.Load(list, l => l.ContentTypes.Include( + ct => ct.Id, + ct => ct.StringId, + ct => ct.Name, + ct => ct.ReadOnly, + + ct => ct.Parent.Id + )); + + context.Load(spObject, f => f.UniqueContentTypeOrder); + context.ExecuteQueryWithTrace(); + + var listContentTypes = list.ContentTypes; + + var assert = ServiceFactory.AssertService + .NewAssert(definition, spObject) + .ShouldNotBeNull(spObject) + .ShouldNotBeNull(list); + + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(def => def.ContentTypes); + var dstProp = d.GetExpressionValue(ct => ct.UniqueContentTypeOrder); + + var isValid = true; + + foreach (var srcContentTypeDef in s.ContentTypes) + { + var exists = false; + + if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeId)) + { + var spContentTypeId = srcContentTypeDef.ContentTypeId.ToUpper(); + var listContentType = listContentTypes.FirstOrDefault(c => c.StringId.StartsWith(spContentTypeId)); + + exists = listContentType != null; + + } + else if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeName)) + { + var listContentType = listContentTypes.FirstOrDefault(c => c.Name.ToUpper() == srcContentTypeDef.ContentTypeName.ToUpper()); + exists = listContentType != null; + } + + if (exists) + { + isValid = false; + break; + } + } + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = dstProp, + IsValid = isValid + }; + }); } } } diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ContentTypes/UniqueContentTypeOrderDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ContentTypes/UniqueContentTypeOrderDefinitionValidator.cs index 1111f0c48..d5e7636aa 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ContentTypes/UniqueContentTypeOrderDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ContentTypes/UniqueContentTypeOrderDefinitionValidator.cs @@ -1,21 +1,93 @@ -using SPMeta2.CSOM.ModelHandlers.ContentTypes; -using SPMeta2.Definitions; -using SPMeta2.Definitions.Base; -using SPMeta2.Definitions.ContentTypes; -using SPMeta2.Utils; - -namespace SPMeta2.Regression.CSOM.Validation.ContentTypes -{ - public class UniqueContentTypeOrderDefinitionValidator : UniqueContentTypeOrderModelHandler - { - public override void DeployModel(object modelHost, DefinitionBase model) - { - var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - var spObject = ExtractFolderFromHost(modelHost); - - ServiceFactory.AssertService - .NewAssert(definition, spObject) - .ShouldNotBeNull(spObject); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.SharePoint.Client; +using SPMeta2.CSOM.ModelHandlers.ContentTypes; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; +using SPMeta2.Definitions.ContentTypes; +using SPMeta2.Utils; +using SPMeta2.CSOM.Extensions; +using SPMeta2.Containers.Assertion; + +namespace SPMeta2.Regression.CSOM.Validation.ContentTypes +{ + public class UniqueContentTypeOrderDefinitionValidator : UniqueContentTypeOrderModelHandler + { + public override void DeployModel(object modelHost, DefinitionBase model) + { + var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + var list = ExtractListFromHost(modelHost); + var spObject = ExtractFolderFromHost(modelHost); + + var context = spObject.Context; + + context.Load(list, l => l.ContentTypes.Include( + ct => ct.Id, + ct => ct.StringId, + ct => ct.Name, + ct => ct.ReadOnly, + + ct => ct.Parent.Id + )); + + context.Load(spObject, f => f.UniqueContentTypeOrder); + context.ExecuteQueryWithTrace(); + + var listContentTypes = list.ContentTypes; + var contentTypeOrder = spObject.UniqueContentTypeOrder; + + var assert = ServiceFactory.AssertService + .NewAssert(definition, spObject) + .ShouldNotBeNull(spObject) + .ShouldNotBeNull(list) + .ShouldNotBeNull(contentTypeOrder); + + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(def => def.ContentTypes); + var dstProp = d.GetExpressionValue(ct => ct.UniqueContentTypeOrder); + + var isValid = true; + + foreach (var srcContentTypeDef in s.ContentTypes) + { + var exists = true; + + if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeId)) + { + var spContentTypeId = srcContentTypeDef.ContentTypeId.ToUpper(); + var listContentType = contentTypeOrder.FirstOrDefault(c => c.StringValue.ToUpper().StartsWith(spContentTypeId)); + + exists = listContentType != null; + } + else if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeName)) + { + var spContentType = listContentTypes.FirstOrDefault(c => c.Name == srcContentTypeDef.ContentTypeName); + var spContentTypeId = spContentType.StringId.ToUpper(); + + var listContentType = contentTypeOrder.FirstOrDefault(c => c.StringValue.ToUpper().StartsWith(spContentTypeId)); + + exists = listContentType != null; + } + + if (!exists) + { + isValid = false; + break; + } + } + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = dstProp, + IsValid = isValid + }; + }); + + } + } +} diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Fields/LookupFieldDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Fields/LookupFieldDefinitionValidator.cs index 46fe93b91..18db3cfd0 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Fields/LookupFieldDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Fields/LookupFieldDefinitionValidator.cs @@ -7,6 +7,7 @@ using SPMeta2.Definitions; using SPMeta2.Definitions.Fields; using SPMeta2.Utils; +using System.Xml.Linq; namespace SPMeta2.Regression.CSOM.Validation.Fields { @@ -70,7 +71,7 @@ public override void DeployModel(object modelHost, DefinitionBase model) HostList = ExtractListFromHost(modelHost); HostSite = ExtractSiteFromHost(modelHost); - CurrentModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + CurrentModelHost = modelHost.WithAssertAndCast("CurrentModelHost", value => value.RequireNotNull()); var assert = ServiceFactory.AssertService.NewAssert(model, definition, spObject); @@ -137,6 +138,9 @@ public override void DeployModel(object modelHost, DefinitionBase model) if (!string.IsNullOrEmpty(typedDefinition.LookupWebUrl)) { var lookupFieldModelHandler = new LookupFieldModelHandler(); + ReflectionUtils.SetNonPublicPropertyValue(lookupFieldModelHandler, "CurrentModelHost", CurrentModelHost); + ReflectionUtils.SetNonPublicPropertyValue(lookupFieldModelHandler, "ModelHost", CurrentModelHost); + var targetWeb = lookupFieldModelHandler.GetTargetWeb(HostSite, typedDefinition); typedFieldAssert.ShouldBeEqual((p, s, d) => @@ -165,9 +169,11 @@ public override void DeployModel(object modelHost, DefinitionBase model) var context = site.Context; var lookupFieldModelHandler = new LookupFieldModelHandler(); - var web = lookupFieldModelHandler.GetTargetWeb(site, typedDefinition); - + ReflectionUtils.SetNonPublicPropertyValue(lookupFieldModelHandler, "CurrentModelHost", CurrentModelHost); + ReflectionUtils.SetNonPublicPropertyValue(lookupFieldModelHandler, "ModelHost", CurrentModelHost); + var web = lookupFieldModelHandler.GetTargetWeb(site, typedDefinition); + context.Load(web); context.ExecuteQueryWithTrace(); @@ -200,12 +206,13 @@ public override void DeployModel(object modelHost, DefinitionBase model) { var site = HostSite; var context = site.Context; - - + var lookupFieldModelHandler = new LookupFieldModelHandler(); - var web = lookupFieldModelHandler.GetTargetWeb(site, typedDefinition); - + ReflectionUtils.SetNonPublicPropertyValue(lookupFieldModelHandler, "CurrentModelHost", CurrentModelHost); + ReflectionUtils.SetNonPublicPropertyValue(lookupFieldModelHandler, "ModelHost", CurrentModelHost); + var web = lookupFieldModelHandler.GetTargetWeb(site, typedDefinition); + context.Load(web); context.ExecuteQueryWithTrace(); @@ -290,7 +297,31 @@ public override void DeployModel(object modelHost, DefinitionBase model) } } - typedFieldAssert.SkipProperty(m => m.CountRelated, "CountRelated is not supported by CSOM"); + if (typedDefinition.CountRelated.HasValue) + { + typedFieldAssert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.CountRelated); + var dstXmlNode = XDocument.Parse(d.SchemaXml).Root; + + var isValid = bool.Parse(dstXmlNode.Attribute("CountRelated").Value) == + typedDefinition.CountRelated.Value; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + + //typedFieldAssert.ShouldBeEqual(m => m.CountRelated, o => o.cou); + } + else + { + typedFieldAssert.SkipProperty(m => m.CountRelated, "CountRelated is NULL. Skipping."); + } } } } diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/WebPartDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/WebPartDefinitionValidator.cs index 9183764de..435f68ac4 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/WebPartDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/WebPartDefinitionValidator.cs @@ -68,7 +68,6 @@ public override void DeployModel(object modelHost, DefinitionBase model) var webPartXmlString = webClient.DownloadString(webpartExportUrl); CurrentWebPartXml = WebpartXmlExtensions.LoadWebpartXmlDocument(webPartXmlString); - assert.ShouldBeEqual(m => m.Title, o => o.Title); // checking the web part type, shoul be as expected @@ -418,6 +417,11 @@ public override void DeployModel(object modelHost, DefinitionBase model) assert.SkipProperty(m => m.AuthorizationFilter, "AuthorizationFilter is null or empty. Skipping."); } + if (definition.Hidden.HasValue) + assert.ShouldBeEqual(m => m.Hidden, o => o.Hidden); + else + assert.SkipProperty(m => m.Hidden, "Hidden is null or empty. Skipping."); + }); } } diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientListViewWebPartDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientListViewWebPartDefinitionValidator.cs index fae624fa6..307616b6f 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientListViewWebPartDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientListViewWebPartDefinitionValidator.cs @@ -239,47 +239,47 @@ public override void DeployModel(object modelHost, DefinitionBase model) else { assert.SkipProperty(m => m.ViewName, "ViewName is null or empty. Skipping."); - } - - if (!string.IsNullOrEmpty(definition.ViewUrl)) - { - var list = LookupList(listItemModelHost, definition); - var bindContext = LookupBindContext(listItemModelHost, definition); - - var viewBindingXml = XDocument.Parse(CurrentWebPartXml.GetListViewWebPartProperty("ListViewXml")); - var viewId = new Guid(viewBindingXml.Root.GetAttributeValue("Name")); - - var bindedView = list.Views.GetById(viewId); - var targetView = list.Views.GetByTitle(definition.ViewName); - - context.Load(bindedView, l => l.ViewFields, l => l.ViewQuery, l => l.RowLimit); - context.Load(targetView, l => l.ViewFields, l => l.ViewQuery, l => l.RowLimit); - - context.ExecuteQueryWithTrace(); - - var isValid = false; - - // these are two different views, just CAML and field count - isValid = (bindedView.ViewFields.Count == targetView.ViewFields.Count) - && (bindedView.ViewQuery == targetView.ViewQuery) - && (bindedView.RowLimit == targetView.RowLimit); - - assert.ShouldBeEqual((p, s, d) => - { - var srcProp = s.GetExpressionValue(m => m.ViewUrl); - - return new PropertyValidationResult - { - Tag = p.Tag, - Src = srcProp, - Dst = null, - IsValid = isValid - }; - }); - } - else - { - assert.SkipProperty(m => m.ViewUrl, "ViewUrl is null or empty. Skipping."); + } + + if (!string.IsNullOrEmpty(definition.ViewUrl)) + { + var list = LookupList(listItemModelHost, definition); + var bindContext = LookupBindContext(listItemModelHost, definition); + + var viewBindingXml = XDocument.Parse(CurrentWebPartXml.GetListViewWebPartProperty("ListViewXml")); + var viewId = new Guid(viewBindingXml.Root.GetAttributeValue("Name")); + + var bindedView = list.Views.GetById(viewId); + var targetView = list.Views.GetByTitle(definition.ViewName); + + context.Load(bindedView, l => l.ViewFields, l => l.ViewQuery, l => l.RowLimit); + context.Load(targetView, l => l.ViewFields, l => l.ViewQuery, l => l.RowLimit); + + context.ExecuteQueryWithTrace(); + + var isValid = false; + + // these are two different views, just CAML and field count + isValid = (bindedView.ViewFields.Count == targetView.ViewFields.Count) + && (bindedView.ViewQuery == targetView.ViewQuery) + && (bindedView.RowLimit == targetView.RowLimit); + + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.ViewUrl); + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + assert.SkipProperty(m => m.ViewUrl, "ViewUrl is null or empty. Skipping."); } // skip it, it will be part of the .Toolbar validation @@ -294,7 +294,10 @@ public override void DeployModel(object modelHost, DefinitionBase model) if (typedDefinition.WebId.HasGuidValue() || !string.IsNullOrEmpty(typedDefinition.WebUrl)) { targetWeb = new LookupFieldModelHandler() - .GetTargetWeb(this.CurrentClientContext.Site, typedDefinition.WebUrl, typedDefinition.WebId); + .GetTargetWeb(this.CurrentClientContext.Site, + typedDefinition.WebUrl, + typedDefinition.WebId, + modelHost); } var list = XsltListViewWebPartModelHandler.LookupList(targetWeb, @@ -388,16 +391,16 @@ private ClientXsltListViewWebPartDefinitionValidator.ListBindContext if (wpModel.ViewId.HasValue && wpModel.ViewId != default(Guid)) view = list.Views.GetById(wpModel.ViewId.Value); else if (!string.IsNullOrEmpty(wpModel.ViewName)) - view = list.Views.GetByTitle(wpModel.ViewName); - else if (!string.IsNullOrEmpty(wpModel.ViewUrl)) - { - var views = list.Views; - - context.Load(views, v => v.Include(r => r.ServerRelativeUrl)); - context.ExecuteQueryWithTrace(); - - view = views.ToArray() - .FirstOrDefault(v => v.ServerRelativeUrl.ToUpper().EndsWith(wpModel.ViewUrl.ToUpper())); + view = list.Views.GetByTitle(wpModel.ViewName); + else if (!string.IsNullOrEmpty(wpModel.ViewUrl)) + { + var views = list.Views; + + context.Load(views, v => v.Include(r => r.ServerRelativeUrl)); + context.ExecuteQueryWithTrace(); + + view = views.ToArray() + .FirstOrDefault(v => v.ServerRelativeUrl.ToUpper().EndsWith(wpModel.ViewUrl.ToUpper())); } context.Load(list, l => l.Id); diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientXsltListViewWebPartDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientXsltListViewWebPartDefinitionValidator.cs index 5bae940f9..bcb04b598 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientXsltListViewWebPartDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientXsltListViewWebPartDefinitionValidator.cs @@ -56,16 +56,16 @@ private ListBindContext LookupBindContext(ListItemModelHost listItemModelHost, X if (wpModel.ViewId.HasValue && wpModel.ViewId != default(Guid)) view = list.Views.GetById(wpModel.ViewId.Value); else if (!string.IsNullOrEmpty(wpModel.ViewName)) - view = list.Views.GetByTitle(wpModel.ViewName); - else if (!string.IsNullOrEmpty(wpModel.ViewUrl)) - { - var views = list.Views; - - context.Load(views, v => v.Include(r => r.ServerRelativeUrl)); - context.ExecuteQueryWithTrace(); - - view = views.ToArray() - .FirstOrDefault(v => v.ServerRelativeUrl.ToUpper().EndsWith(wpModel.ViewUrl.ToUpper())); + view = list.Views.GetByTitle(wpModel.ViewName); + else if (!string.IsNullOrEmpty(wpModel.ViewUrl)) + { + var views = list.Views; + + context.Load(views, v => v.Include(r => r.ServerRelativeUrl)); + context.ExecuteQueryWithTrace(); + + view = views.ToArray() + .FirstOrDefault(v => v.ServerRelativeUrl.ToUpper().EndsWith(wpModel.ViewUrl.ToUpper())); } context.Load(list, l => l.Id); @@ -327,14 +327,14 @@ public override void DeployModel(object modelHost, DefinitionBase model) var viewBindingXml = XDocument.Parse(CurrentWebPartXml.GetProperty("XmlDefinition")); var viewId = new Guid(viewBindingXml.Root.GetAttributeValue("Name")); - var bindedView = list.Views.GetById(viewId); - - var views = list.Views; - - context.Load(views, v => v.Include(r => r.ServerRelativeUrl)); - context.ExecuteQueryWithTrace(); - - var targetView = views.ToArray() + var bindedView = list.Views.GetById(viewId); + + var views = list.Views; + + context.Load(views, v => v.Include(r => r.ServerRelativeUrl)); + context.ExecuteQueryWithTrace(); + + var targetView = views.ToArray() .FirstOrDefault(v => v.ServerRelativeUrl.ToUpper().EndsWith(definition.ViewUrl.ToUpper())); context.Load(bindedView, l => l.BaseViewId, l => l.ViewFields, l => l.ViewQuery, l => l.RowLimit, l => l.JSLink); @@ -352,7 +352,7 @@ public override void DeployModel(object modelHost, DefinitionBase model) && (bindedView.BaseViewId == targetView.BaseViewId); assert.ShouldBeEqual((p, s, d) => - { + { var srcProp = s.GetExpressionValue(m => m.ViewUrl); return new PropertyValidationResult @@ -365,7 +365,7 @@ public override void DeployModel(object modelHost, DefinitionBase model) }); } else - { + { assert.SkipProperty(m => m.ViewUrl, "ViewUrl is null or empty. Skipping."); } @@ -726,7 +726,11 @@ public override void DeployModel(object modelHost, DefinitionBase model) if (typedDefinition.WebId.HasGuidValue() || !string.IsNullOrEmpty(typedDefinition.WebUrl)) { targetWeb = new LookupFieldModelHandler() - .GetTargetWeb(this.CurrentClientContext.Site, typedDefinition.WebUrl, typedDefinition.WebId); + .GetTargetWeb( + this.CurrentClientContext.Site, + typedDefinition.WebUrl, + typedDefinition.WebId, + modelHost); } var list = XsltListViewWebPartModelHandler.LookupList(targetWeb, @@ -818,7 +822,8 @@ XsltListViewWebPartDefinition wpModel { web = new LookupFieldModelHandler() .GetTargetWeb(listItemModelHost.HostClientContext.Site, - wpModel.WebUrl, wpModel.WebId); + wpModel.WebUrl, wpModel.WebId, + listItemModelHost); webId = web.Id; } 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 c11e5d871..c9de6171a 100644 --- a/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/Base/TokenReplacementServiceTestBase.cs +++ b/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/Base/TokenReplacementServiceTestBase.cs @@ -88,8 +88,8 @@ protected bool CheckRootSiteOnHost(object context) var isValid = true; // ~sitecollection -> string.Empty on the root web - isValid &= ShouldPass("~sitecollection -> string.Empty", context, "~sitecollection", string.Empty); - isValid &= ShouldPass("~SiteCollection -> string.Empty", context, "~SiteCollection", string.Empty); + isValid &= ShouldPass("~sitecollection -> string.Empty", context, "~sitecollection", "/"); + isValid &= ShouldPass("~SiteCollection -> string.Empty", context, "~SiteCollection", "/"); // ~sitecollection/something -> /something on the root web isValid &= ShouldPass("~sitecollection/something1 -> /something1", context, "~sitecollection/something1", "/something1"); @@ -125,14 +125,22 @@ protected bool CheckRootWebOnHost(object context) { var isValid = true; - // ~site -> string.Empty on the root web - isValid &= ShouldPass("~site -> string.Empty", context, "~site", string.Empty); - isValid &= ShouldPass("~Site -> string.Empty", context, "~Site", string.Empty); + // ~site -> / on the root web + isValid &= ShouldPass("~site -> string.Empty", context, "~site", "/"); + isValid &= ShouldPass("~Site -> string.Empty", context, "~Site", "/"); + + // ~site/ -> / on the root web + isValid &= ShouldPass("~site/ -> string.Empty", context, "~site/", "/"); + isValid &= ShouldPass("~Site/ -> string.Empty", context, "~Site/", "/"); // ~site/something -> /something on the root web isValid &= ShouldPass("~site/something1 -> /something1", context, "~site/something1", "/something1"); isValid &= ShouldPass("~Site/something2 -> /something2", context, "~Site/something2", "/something2"); + // ~site/something/ -> /something on the root web + isValid &= ShouldPass("~site/something1/ -> /something1", context, "~site/something1/", "/something1"); + isValid &= ShouldPass("~Site/something2/ -> /something2", context, "~Site/something2/", "/something2"); + // same same isValid &= ShouldPass("site/something1 -> site/something1", context, "site/something1", "site/something1"); isValid &= ShouldPass("Site/something2 -> site/something2", context, "Site/something2", "Site/something2"); 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 6fe5d17b5..a3cd1edc8 100644 --- a/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/CSOM/CSOMTokenReplacementServiceTests.cs +++ b/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Services/CSOM/CSOMTokenReplacementServiceTests.cs @@ -66,9 +66,6 @@ public void SelfDiagnostic_TestShouldHaveAllTokens() [TestCategory("Regression.Impl.CSOMTokenReplacementService")] public void CSOMTokenReplacementService_Can_Replace_SiteCollection_Token() { - if (!CSOMTokenReplacementService.AllowClientContextAsTokenReplacementContext) - return; - var isValid = true; ProvisionRunner.SiteUrls.ForEach(siteUrl => @@ -98,9 +95,6 @@ public void CSOMTokenReplacementService_Can_Replace_SiteCollection_Token() [TestCategory("Regression.Impl.CSOMTokenReplacementService")] public void CSOMTokenReplacementService_Can_Replace_Site_Token() { - if (!CSOMTokenReplacementService.AllowClientContextAsTokenReplacementContext) - return; - var isValid = true; var runner = new CSOMProvisionRunner(); @@ -126,6 +120,31 @@ public void CSOMTokenReplacementService_Can_Replace_Site_Token() Assert.IsTrue(isValid); } + [TestMethod] + [TestCategory("Regression.Impl.CSOMTokenReplacementService")] + public void CSOMTokenReplacementService_Can_Replace_Site_Token_Raw() + { + var isValid = true; + var runner = new CSOMProvisionRunner(); + + runner.SiteUrls.ForEach(siteUrl => + { + runner.WithCSOMContext(siteUrl, context => + { + PreloadProperties(context); + + var web = context.Web; + + if (web.ServerRelativeUrl == "/") + { + isValid &= CheckRootWebOnHost(context); + } + }); + }); + + Assert.IsTrue(isValid); + } + [TestMethod] [TestCategory("Regression.Impl.CSOMTokenReplacementService")] public void CSOMTokenReplacementService_Should_Not_ChangeNonTokenedUrl() @@ -168,9 +187,6 @@ public void CSOMTokenReplacementService_Should_Not_ChangeNonTokenedUrl() [TestCategory("Regression.Impl.CSOMTokenReplacementService")] public void CSOMTokenReplacementService_Should_Support_ClientContext() { - if (!CSOMTokenReplacementService.AllowClientContextAsTokenReplacementContext) - return; - var runner = new CSOMProvisionRunner(); runner.SiteUrls.ForEach(siteUrl => diff --git a/SPMeta2/SPMeta2.Regression.Impl.Tests/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.Impl.Tests/Properties/AssemblyInfo.cs index fe8ed4165..3de3afa0d 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.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2.Regression.SSOM.Standard/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.SSOM.Standard/Properties/AssemblyInfo.cs index 143ef9adf..67eed7979 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.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2.Regression.SSOM.Standard/Validation/Fields/TaxonomyFieldDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM.Standard/Validation/Fields/TaxonomyFieldDefinitionValidator.cs index bd4f8eaf9..f6724ddb9 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM.Standard/Validation/Fields/TaxonomyFieldDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM.Standard/Validation/Fields/TaxonomyFieldDefinitionValidator.cs @@ -301,8 +301,12 @@ public override void DeployModel(object modelHost, DefinitionBase model) // etc assert.SkipProperty(m => m.TermLCID, "TermLCID. Skipping property."); - assert.SkipProperty(m => m.TermSetLCID, "TermSetLCID. Skipping property."); - + assert.SkipProperty(m => m.TermSetLCID, "TermSetLCID. Skipping property."); + + if (definition.UserCreated.HasValue) + assert.ShouldBeEqual(m => m.UserCreated, o => o.UserCreated); + else + assert.SkipProperty(m => m.UserCreated, "UserCreated is null. Skipping property."); } } } diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.SSOM/Properties/AssemblyInfo.cs index c2c5a9ff4..806601555 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.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2.Regression.SSOM/SPMeta2.Regression.SSOM.csproj b/SPMeta2/SPMeta2.Regression.SSOM/SPMeta2.Regression.SSOM.csproj index 3e938e104..c46ccb62d 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/SPMeta2.Regression.SSOM.csproj +++ b/SPMeta2/SPMeta2.Regression.SSOM/SPMeta2.Regression.SSOM.csproj @@ -132,6 +132,8 @@ + + diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/ContentTypes/HideContentTypeLinksDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/ContentTypes/HideContentTypeLinksDefinitionValidator.cs index 171ebf2f4..84e3cf2bd 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/ContentTypes/HideContentTypeLinksDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/ContentTypes/HideContentTypeLinksDefinitionValidator.cs @@ -1,10 +1,14 @@ -using SPMeta2.Definitions; +using System; +using System.Linq; +using SPMeta2.Definitions; using SPMeta2.Definitions.Base; using SPMeta2.Definitions.ContentTypes; using SPMeta2.SSOM.ModelHandlers; using SPMeta2.SSOM.ModelHandlers.ContentTypes; using SPMeta2.SSOM.ModelHosts; -using SPMeta2.Utils; +using SPMeta2.Utils; +using Microsoft.SharePoint; +using SPMeta2.Containers.Assertion; namespace SPMeta2.Regression.SSOM.Validation.ContentTypes { @@ -13,11 +17,54 @@ public class HideContentTypeLinksDefinitionValidator : HideContentTypeLinksModel public override void DeployModel(object modelHost, DefinitionBase model) { var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - var spObject = ExtractFolderFromHost(modelHost); + + var spObject = ExtractFolderFromHost(modelHost); + var contentTypeOrder = spObject.UniqueContentTypeOrder; - ServiceFactory.AssertService + var assert = ServiceFactory.AssertService .NewAssert(definition, spObject) - .ShouldNotBeNull(spObject); + .ShouldNotBeNull(spObject) + .ShouldNotBeNull(contentTypeOrder); + + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(def => def.ContentTypes); + var dstProp = d.GetExpressionValue(ct => ct.UniqueContentTypeOrder); + + var isValid = true; + + foreach (var srcContentTypeDef in s.ContentTypes) + { + var exists = false; + + if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeId)) + { + var spContentTypeId = new SPContentTypeId(srcContentTypeDef.ContentTypeId); + var listContentType = contentTypeOrder.FirstOrDefault(c => c.Parent.Id == spContentTypeId); + + exists = listContentType != null; + } + else if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeName)) + { + var listContentType = contentTypeOrder.FirstOrDefault(c => c.Name.ToUpper() == srcContentTypeDef.ContentTypeName.ToUpper()); + exists = listContentType != null; + } + + if (exists) + { + isValid = false; + break; + } + } + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = dstProp, + IsValid = isValid + }; + }); } } } diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/ContentTypes/RemoveContentTypeLinksDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/ContentTypes/RemoveContentTypeLinksDefinitionValidator.cs index b69fed55f..a4cbb0e10 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/ContentTypes/RemoveContentTypeLinksDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/ContentTypes/RemoveContentTypeLinksDefinitionValidator.cs @@ -1,22 +1,72 @@ -using SPMeta2.Definitions; -using SPMeta2.Definitions.ContentTypes; -using SPMeta2.SSOM.ModelHandlers; -using SPMeta2.SSOM.ModelHandlers.ContentTypes; -using SPMeta2.SSOM.ModelHosts; -using SPMeta2.Utils; - -namespace SPMeta2.Regression.SSOM.Validation.ContentTypes -{ - public class RemoveContentTypeLinksDefinitionValidator : RemoveContentTypeLinksModelHandler - { - public override void DeployModel(object modelHost, DefinitionBase model) - { - var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - var spObject = ExtractListFromHost(modelHost); - - ServiceFactory.AssertService - .NewAssert(definition, spObject) - .ShouldNotBeNull(spObject); - } - } -} +using System; +using System.Linq; +using SPMeta2.Containers.Assertion; +using SPMeta2.Definitions; +using SPMeta2.Definitions.ContentTypes; +using SPMeta2.SSOM.ModelHandlers; +using SPMeta2.SSOM.ModelHandlers.ContentTypes; +using SPMeta2.SSOM.ModelHosts; +using SPMeta2.Utils; +using Microsoft.SharePoint; + +namespace SPMeta2.Regression.SSOM.Validation.ContentTypes +{ + public class RemoveContentTypeLinksDefinitionValidator : RemoveContentTypeLinksModelHandler + { + public override void DeployModel(object modelHost, DefinitionBase model) + { + var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + var spObject = ExtractListFromHost(modelHost); + + var assert = ServiceFactory.AssertService + .NewAssert(definition, spObject) + .ShouldNotBeNull(spObject); + + // the content type must not be in the list + var listContentTypes = spObject.ContentTypes + .Cast() + .ToList(); + + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(def => def.ContentTypes); + var dstProp = d.GetExpressionValue(ct => ct.ContentTypes); + + var isValid = true; + + foreach (var srcContentTypeDef in s.ContentTypes) + { + var exists = false; + + if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeId)) + { + var spContentTypeId = new SPContentTypeId(srcContentTypeDef.ContentTypeId); + var listContentType = listContentTypes.FirstOrDefault(c => c.Parent.Id == spContentTypeId); + + exists = listContentType != null; + + } + else if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeName)) + { + var listContentType = listContentTypes.FirstOrDefault(c => c.Name.ToUpper() == srcContentTypeDef.ContentTypeName.ToUpper()); + exists = listContentType != null; + } + + if (exists) + { + isValid = false; + break; + } + } + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = dstProp, + IsValid = isValid + }; + }); + } + } +} diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/ContentTypes/UniqueContentTypeOrderDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/ContentTypes/UniqueContentTypeOrderDefinitionValidator.cs index a71b799ef..e53695527 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/ContentTypes/UniqueContentTypeOrderDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/ContentTypes/UniqueContentTypeOrderDefinitionValidator.cs @@ -1,10 +1,15 @@ -using SPMeta2.Definitions; -using SPMeta2.Definitions.Base; -using SPMeta2.Definitions.ContentTypes; -using SPMeta2.SSOM.ModelHandlers; -using SPMeta2.SSOM.ModelHandlers.ContentTypes; -using SPMeta2.SSOM.ModelHosts; -using SPMeta2.Utils; +using System; +using System.Linq; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; +using SPMeta2.Definitions.ContentTypes; +using SPMeta2.SSOM.ModelHandlers; +using SPMeta2.SSOM.ModelHandlers.ContentTypes; +using SPMeta2.SSOM.ModelHosts; +using SPMeta2.Utils; +using Microsoft.SharePoint; +using SPMeta2.Containers.Assertion; + namespace SPMeta2.Regression.SSOM.Validation.ContentTypes { @@ -12,12 +17,54 @@ public class UniqueContentTypeOrderDefinitionValidator : UniqueContentTypeOrderM { public override void DeployModel(object modelHost, DefinitionBase model) { - var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - var spObject = ExtractFolderFromHost(modelHost); - - ServiceFactory.AssertService - .NewAssert(definition, spObject) - .ShouldNotBeNull(spObject); + var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + var spObject = ExtractFolderFromHost(modelHost); + var contentTypeOrder = spObject.UniqueContentTypeOrder; + + var assert = ServiceFactory.AssertService + .NewAssert(definition, spObject) + .ShouldNotBeNull(spObject) + .ShouldNotBeNull(contentTypeOrder); + + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(def => def.ContentTypes); + var dstProp = d.GetExpressionValue(ct => ct.UniqueContentTypeOrder); + + var isValid = true; + + foreach (var srcContentTypeDef in s.ContentTypes) + { + var exists = false; + + if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeId)) + { + var spContentTypeId = new SPContentTypeId(srcContentTypeDef.ContentTypeId); + var listContentType = contentTypeOrder.FirstOrDefault(c => c.Parent.Id == spContentTypeId); + + exists = listContentType != null; + } + else if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeName)) + { + var listContentType = contentTypeOrder.FirstOrDefault(c => c.Name.ToUpper() == srcContentTypeDef.ContentTypeName.ToUpper()); + exists = listContentType != null; + } + + if (!exists) + { + isValid = false; + break; + } + } + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = dstProp, + IsValid = isValid + }; + }); } } } diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/FarmSolutionDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/FarmSolutionDefinitionValidator.cs index 582525a2c..b7162c093 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/FarmSolutionDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/FarmSolutionDefinitionValidator.cs @@ -5,6 +5,8 @@ using SPMeta2.SSOM.ModelHosts; using SPMeta2.Containers.Assertion; using SPMeta2.Extensions; +using Microsoft.SharePoint.Administration; +using SPMeta2.Exceptions; namespace SPMeta2.Regression.SSOM.Validation { @@ -22,9 +24,27 @@ public FarmSolutionDefinitionValidator() public override void DeployModel(object modelHost, DefinitionBase model) { var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - var farmModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); - var solution = FindExistingSolution(farmModelHost, definition); + SPFarm farm = null; + SPWebApplication webApp = null; + + if (modelHost is WebApplicationModelHost) + { + farm = (modelHost as WebApplicationModelHost).HostWebApplication.Farm; + webApp = (modelHost as WebApplicationModelHost).HostWebApplication; + } + else if (modelHost is FarmModelHost) + { + farm = (modelHost as FarmModelHost).HostFarm; + webApp = null; + } + else + { + throw new SPMeta2Exception( + string.Format("Unsupported model host type:[{0}]", modelHost.GetType())); + } + + var solution = FindExistingSolution(modelHost, farm, webApp, definition); var assert = ServiceFactory.AssertService .NewAssert(definition, definition, solution); @@ -54,6 +74,8 @@ public override void DeployModel(object modelHost, DefinitionBase model) assert.SkipProperty(m => m.ShouldRetract, "ShouldDelete = true"); assert.SkipProperty(m => m.ShouldUpgrade, "ShouldDelete = true"); + CheckWebApplicationDeployment(modelHost, farm, webApp, solution, definition); + return; } @@ -84,8 +106,23 @@ public override void DeployModel(object modelHost, DefinitionBase model) { var srcProp = s.GetExpressionValue(def => def.ShouldRetract); - var isValid = d.Deployed == false - && definition.HasPropertyBagValue("HadRetractHit"); + var isValid = false; + + if (webApp == null) + { + isValid = d.Deployed == false + && definition.HasPropertyBagValue("HadRetractHit"); + } + else + { + isValid = !solution.DeployedWebApplications.Contains(webApp) + && definition.HasPropertyBagValue("HadRetractHit"); + } + + if (isValid == false) + { + + } return new PropertyValidationResult { @@ -126,7 +163,7 @@ public override void DeployModel(object modelHost, DefinitionBase model) { var srcProp = s.GetExpressionValue(def => def.ShouldUpgrade); - var isValid = definition.HasPropertyBagValue("HadUpgradetHit"); + var isValid = definition.HasPropertyBagValue("HadUpgradetHit"); return new PropertyValidationResult { @@ -137,6 +174,8 @@ public override void DeployModel(object modelHost, DefinitionBase model) }; }); + CheckWebApplicationDeployment(modelHost, farm, webApp, solution, definition); + return; } @@ -168,7 +207,18 @@ public override void DeployModel(object modelHost, DefinitionBase model) var srcProp = s.GetExpressionValue(def => def.ShouldDeploy); var isValid = d.Deployed - && definition.HasPropertyBagValue("HadDeploymentHit"); + && definition.HasPropertyBagValue("HadDeploymentHit"); + + if (webApp == null) + { + isValid = d.Deployed == true + && definition.HasPropertyBagValue("HadDeploymentHit"); + } + else + { + isValid = solution.DeployedWebApplications.Contains(webApp) + && definition.HasPropertyBagValue("HadDeploymentHit"); + } return new PropertyValidationResult { @@ -179,6 +229,8 @@ public override void DeployModel(object modelHost, DefinitionBase model) }; }); + CheckWebApplicationDeployment(modelHost, farm, webApp, solution, definition); + return; } @@ -225,6 +277,54 @@ public override void DeployModel(object modelHost, DefinitionBase model) assert.SkipProperty(m => m.UpgradeDate, "UpgradeDate is NULL"); } } + + private void CheckWebApplicationDeployment(object modelHost, SPFarm farm, SPWebApplication webApp, SPSolution solution, FarmSolutionDefinition definition) + { + // might come from the deleting operation + if (solution != null) + { + // web app scope deployment + if (webApp != null) + { + if (!solution.Deployed) + return; + + if (solution.DeploymentState == SPSolutionDeploymentState.GlobalDeployed + || solution.DeploymentState == SPSolutionDeploymentState.NotDeployed) + { + throw new SPMeta2Exception( + string.Format("Solution is not expected to have deployment state:[{0}]", + solution.DeploymentState)); + } + + if (solution.DeployedWebApplications.Count == 0) + { + throw new SPMeta2Exception("Web scoped solution is expected to be deployed under at least one web application"); + } + + if (!solution.DeployedWebApplications.Contains(webApp)) + { + throw new SPMeta2Exception( + string.Format("Web scoped solution is expected to be deployed under web application:[{0}]", webApp)); + } + } + else + { + // farm, global deployment + + if (!solution.Deployed) + return; + + if (solution.DeploymentState == SPSolutionDeploymentState.WebApplicationDeployed + || solution.DeploymentState == SPSolutionDeploymentState.NotDeployed) + { + throw new SPMeta2Exception( + string.Format("Farm scoped solution is not expected to have deployment state:[{0}]", + solution.DeploymentState)); + } + } + } + } #endregion } } diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/FieldDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/FieldDefinitionValidator.cs index a547cf45c..f40bf806c 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/FieldDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/FieldDefinitionValidator.cs @@ -10,6 +10,7 @@ using SPMeta2.Utils; using System.Xml.Linq; using System.Linq; +using SPMeta2.Definitions.Fields; namespace SPMeta2.Regression.SSOM.Validation { @@ -66,6 +67,46 @@ protected void ValidateField(AssertPair assert, SPFiel else assert.SkipProperty(m => m.Description); + if (definition is LookupFieldDefinition) + { + var depLookupDefinition = definition as LookupFieldDefinition; + + // cjeck against CountRelated for lookups + if (depLookupDefinition.CountRelated.HasValue + && depLookupDefinition.ReadOnlyField.HasValue) + { + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.ReadOnlyField); + + var isValid = (bool)srcProp.Value == depLookupDefinition.CountRelated.Value; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + assert.SkipProperty(m => m.ReadOnlyField, "CountRelated / ReadOnlyField is null or empty"); + + //if (definition.ReadOnlyField.HasValue) + // assert.ShouldBeEqual(m => m.ReadOnlyField, o => o.ReadOnlyField); + //else + // assert.SkipProperty(m => m.ReadOnlyField, "ReadOnlyField is null or empty"); + } + } + else + { + if (definition.ReadOnlyField.HasValue) + assert.ShouldBeEqual(m => m.ReadOnlyField, o => o.ReadOnlyField); + else + assert.SkipProperty(m => m.ReadOnlyField, "ReadOnlyField is null or empty"); + } CustomFieldTypeValidation(assert, spObject, definition); diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/Fields/LookupFieldDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/Fields/LookupFieldDefinitionValidator.cs index 7052ac082..1dab2481f 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/Fields/LookupFieldDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/Fields/LookupFieldDefinitionValidator.cs @@ -1,84 +1,84 @@ -using System; -using Microsoft.SharePoint; -using Microsoft.SharePoint.BusinessData.MetadataModel; -using SPMeta2.Containers.Assertion; -using SPMeta2.Definitions; -using SPMeta2.Definitions.Fields; -using SPMeta2.Utils; -using Microsoft.SharePoint.Utilities; -using SPMeta2.SSOM.ModelHandlers.Fields; - -namespace SPMeta2.Regression.SSOM.Validation.Fields -{ - public class LookupFieldDefinitionValidator : FieldDefinitionValidator - { - public override Type TargetType - { - get - { - return typeof(LookupFieldDefinition); - } - } - protected override void CustomFieldTypeValidation(AssertPair assert, SPField spObject, FieldDefinition definition) - { - var typedObject = spObject as SPFieldLookup; - var typedDefinition = definition.WithAssertAndCast("model", value => value.RequireNotNull()); - - // https://github.com/SubPointSolutions/spmeta2/issues/310 - // AllowMultipleValues - TRUE - LookupMulti - // AllowMultipleValues - FALSE - Lookup - assert.ShouldBeEqual((p, s, d) => - { - var srcProp = s.GetExpressionValue(m => m.FieldType); - var dstProp = d.GetExpressionValue(m => d.TypeAsString); - - var isValid = typedDefinition.AllowMultipleValues - ? typedObject.TypeAsString == "LookupMulti" - : typedObject.TypeAsString == "Lookup"; - - return new PropertyValidationResult - { - Tag = p.Tag, - Src = srcProp, - Dst = dstProp, - IsValid = isValid - }; - }); - } - public override void DeployModel(object modelHost, DefinitionBase model) - { - ModelHost = modelHost; - - 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 as SPFieldLookup; - var typedDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - - var typedFieldAssert = ServiceFactory.AssertService.NewAssert(model, typedDefinition, typedField); - - typedFieldAssert.ShouldBeEqual(m => m.AllowMultipleValues, o => o.AllowMultipleValues); - - if (typedDefinition.LookupWebId.HasValue) - { - typedFieldAssert.ShouldBeEqual(m => m.LookupWebId, o => o.LookupWebId); - } - else - { - typedFieldAssert.SkipProperty(m => m.LookupWebId, "LookupWebId is NULL. Skipping."); - } - - if (!string.IsNullOrEmpty(typedDefinition.RelationshipDeleteBehavior)) - { - typedFieldAssert.ShouldBeEqual(m => m.RelationshipDeleteBehavior, o => o.GetRelationshipDeleteBehavior()); - } - else - { - typedFieldAssert.SkipProperty(m => m.RelationshipDeleteBehavior, "RelationshipDeleteBehavior is NULL. Skipping."); +using System; +using Microsoft.SharePoint; +using Microsoft.SharePoint.BusinessData.MetadataModel; +using SPMeta2.Containers.Assertion; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Fields; +using SPMeta2.Utils; +using Microsoft.SharePoint.Utilities; +using SPMeta2.SSOM.ModelHandlers.Fields; + +namespace SPMeta2.Regression.SSOM.Validation.Fields +{ + public class LookupFieldDefinitionValidator : FieldDefinitionValidator + { + public override Type TargetType + { + get + { + return typeof(LookupFieldDefinition); + } + } + protected override void CustomFieldTypeValidation(AssertPair assert, SPField spObject, FieldDefinition definition) + { + var typedObject = spObject as SPFieldLookup; + var typedDefinition = definition.WithAssertAndCast("model", value => value.RequireNotNull()); + + // https://github.com/SubPointSolutions/spmeta2/issues/310 + // AllowMultipleValues - TRUE - LookupMulti + // AllowMultipleValues - FALSE - Lookup + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.FieldType); + var dstProp = d.GetExpressionValue(m => d.TypeAsString); + + var isValid = typedDefinition.AllowMultipleValues + ? typedObject.TypeAsString == "LookupMulti" + : typedObject.TypeAsString == "Lookup"; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = dstProp, + IsValid = isValid + }; + }); + } + public override void DeployModel(object modelHost, DefinitionBase model) + { + ModelHost = modelHost; + + 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 as SPFieldLookup; + var typedDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + var typedFieldAssert = ServiceFactory.AssertService.NewAssert(model, typedDefinition, typedField); + + typedFieldAssert.ShouldBeEqual(m => m.AllowMultipleValues, o => o.AllowMultipleValues); + + if (typedDefinition.LookupWebId.HasValue) + { + typedFieldAssert.ShouldBeEqual(m => m.LookupWebId, o => o.LookupWebId); + } + else + { + typedFieldAssert.SkipProperty(m => m.LookupWebId, "LookupWebId is NULL. Skipping."); + } + + if (!string.IsNullOrEmpty(typedDefinition.RelationshipDeleteBehavior)) + { + typedFieldAssert.ShouldBeEqual(m => m.RelationshipDeleteBehavior, o => o.GetRelationshipDeleteBehavior()); + } + else + { + typedFieldAssert.SkipProperty(m => m.RelationshipDeleteBehavior, "RelationshipDeleteBehavior is NULL. Skipping."); } if (!string.IsNullOrEmpty(typedDefinition.RelationshipDeleteBehavior)) @@ -106,135 +106,139 @@ public override void DeployModel(object modelHost, DefinitionBase model) else { typedFieldAssert.SkipProperty(m => m.CountRelated, "CountRelated is NULL. Skipping."); - } - - // web url - if (!string.IsNullOrEmpty(typedDefinition.LookupWebUrl)) - { - var lookupFieldModelHandler = new LookupFieldModelHandler(); - var targetWeb = lookupFieldModelHandler.GetTargetWeb(GetCurrentSite(), typedDefinition); - - typedFieldAssert.ShouldBeEqual((p, s, d) => - { - var srcProp = s.GetExpressionValue(m => m.LookupWebUrl); - - var isValid = d.LookupWebId == targetWeb.ID; - - return new PropertyValidationResult - { - Tag = p.Tag, - Src = srcProp, - Dst = null, - IsValid = isValid - }; - }); - } - else - { - typedFieldAssert.SkipProperty(m => m.LookupWebUrl, "LookupWebUrl is NULL. Skipping."); - } - - - if (!string.IsNullOrEmpty(typedDefinition.LookupListTitle)) - { - var lookupFieldModelHandler = new LookupFieldModelHandler(); - - var targetWeb = lookupFieldModelHandler.GetTargetWeb(GetCurrentSite(), typedDefinition); - var list = targetWeb.Lists[typedDefinition.LookupListTitle]; - - typedFieldAssert.ShouldBeEqual((p, s, d) => - { - var srcProp = s.GetExpressionValue(m => m.LookupListTitle); - - var isValid = list.ID == new Guid(typedField.LookupList); - - return new PropertyValidationResult - { - Tag = p.Tag, - Src = srcProp, - Dst = null, - IsValid = isValid - }; - }); - } - else - { - typedFieldAssert.SkipProperty(m => m.LookupListTitle, "LookupListTitle is NULL. Skipping."); - } - - if (!string.IsNullOrEmpty(typedDefinition.LookupListUrl)) - { - var lookupFieldModelHandler = new LookupFieldModelHandler(); - - var targetWeb = lookupFieldModelHandler.GetTargetWeb(GetCurrentSite(), typedDefinition); - var list = targetWeb.GetList(SPUrlUtility.CombineUrl(targetWeb.ServerRelativeUrl, typedDefinition.LookupListUrl)); - - typedFieldAssert.ShouldBeEqual((p, s, d) => - { - var srcProp = s.GetExpressionValue(m => m.LookupListUrl); - - var isValid = list.ID == new Guid(typedField.LookupList); - - return new PropertyValidationResult - { - Tag = p.Tag, - Src = srcProp, - Dst = null, - IsValid = isValid - }; - }); - } - else - { - typedFieldAssert.SkipProperty(m => m.LookupListUrl, "LookupListUrl is NULL. Skipping."); - } - - - if (!string.IsNullOrEmpty(typedDefinition.LookupList)) - { - if (typedDefinition.LookupList.ToUpper() == "USERINFO") - { - typedFieldAssert.ShouldBeEqual((p, s, d) => - { - var srcProp = s.GetExpressionValue(m => m.LookupList); - - var isValid = GetCurrentSite().RootWeb.SiteUserInfoList.ID == new Guid(typedField.LookupList); - - return new PropertyValidationResult - { - Tag = p.Tag, - Src = srcProp, - Dst = null, - IsValid = isValid - }; - }); - } - else - { - typedFieldAssert.ShouldBeEqual(m => m.LookupList, o => o.LookupList); - } - } - else - { - typedFieldAssert.SkipProperty(m => m.LookupList, "LookupList is NULL. Skipping."); - } - - if (!string.IsNullOrEmpty(typedDefinition.LookupField)) - { - typedFieldAssert.ShouldBeEqual(m => m.LookupField, o => o.LookupField); - } - else - { - typedFieldAssert.SkipProperty(m => m.LookupField, "LookupField is NULL. Skipping."); - } - } - } - - internal static class SPFieldLookupExtensions - { - public static string GetRelationshipDeleteBehavior(this SPFieldLookup field) - { - return field.RelationshipDeleteBehavior.ToString(); - } - } -} + } + + // web url + if (!string.IsNullOrEmpty(typedDefinition.LookupWebUrl)) + { + var lookupFieldModelHandler = new LookupFieldModelHandler(); + ReflectionUtils.SetNonPublicPropertyValue(lookupFieldModelHandler, "ModelHost", modelHost); + + var targetWeb = lookupFieldModelHandler.GetTargetWeb(GetCurrentSite(), typedDefinition); + + typedFieldAssert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.LookupWebUrl); + + var isValid = d.LookupWebId == targetWeb.ID; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + typedFieldAssert.SkipProperty(m => m.LookupWebUrl, "LookupWebUrl is NULL. Skipping."); + } + + + if (!string.IsNullOrEmpty(typedDefinition.LookupListTitle)) + { + var lookupFieldModelHandler = new LookupFieldModelHandler(); + ReflectionUtils.SetNonPublicPropertyValue(lookupFieldModelHandler, "ModelHost", modelHost); + + var targetWeb = lookupFieldModelHandler.GetTargetWeb(GetCurrentSite(), typedDefinition); + var list = targetWeb.Lists[typedDefinition.LookupListTitle]; + + typedFieldAssert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.LookupListTitle); + + var isValid = list.ID == new Guid(typedField.LookupList); + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + typedFieldAssert.SkipProperty(m => m.LookupListTitle, "LookupListTitle is NULL. Skipping."); + } + + if (!string.IsNullOrEmpty(typedDefinition.LookupListUrl)) + { + var lookupFieldModelHandler = new LookupFieldModelHandler(); + ReflectionUtils.SetNonPublicPropertyValue(lookupFieldModelHandler, "ModelHost", modelHost); + + var targetWeb = lookupFieldModelHandler.GetTargetWeb(GetCurrentSite(), typedDefinition); + var list = targetWeb.GetList(SPUrlUtility.CombineUrl(targetWeb.ServerRelativeUrl, typedDefinition.LookupListUrl)); + + typedFieldAssert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.LookupListUrl); + + var isValid = list.ID == new Guid(typedField.LookupList); + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + typedFieldAssert.SkipProperty(m => m.LookupListUrl, "LookupListUrl is NULL. Skipping."); + } + + + if (!string.IsNullOrEmpty(typedDefinition.LookupList)) + { + if (typedDefinition.LookupList.ToUpper() == "USERINFO") + { + typedFieldAssert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.LookupList); + + var isValid = GetCurrentSite().RootWeb.SiteUserInfoList.ID == new Guid(typedField.LookupList); + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + typedFieldAssert.ShouldBeEqual(m => m.LookupList, o => o.LookupList); + } + } + else + { + typedFieldAssert.SkipProperty(m => m.LookupList, "LookupList is NULL. Skipping."); + } + + if (!string.IsNullOrEmpty(typedDefinition.LookupField)) + { + typedFieldAssert.ShouldBeEqual(m => m.LookupField, o => o.LookupField); + } + else + { + typedFieldAssert.SkipProperty(m => m.LookupField, "LookupField is NULL. Skipping."); + } + } + } + + internal static class SPFieldLookupExtensions + { + public static string GetRelationshipDeleteBehavior(this SPFieldLookup field) + { + return field.RelationshipDeleteBehavior.ToString(); + } + } +} diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/ListDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/ListDefinitionValidator.cs index cea956063..2711beca2 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/ListDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/ListDefinitionValidator.cs @@ -47,6 +47,11 @@ public override void DeployModel(object modelHost, DefinitionBase model) assert.SkipProperty(m => m.Description); }); + if (definition.EnableAssignToEmail.HasValue) + assert.ShouldBeEqual(m => m.EnableAssignToEmail, o => o.EnableAssignToEmail); + else + assert.SkipProperty(m => m.EnableAssignToEmail, "EnableAssignToEmail is null or empty"); + if (definition.NavigateForFormsPages.HasValue) { assert.ShouldBeEqual(m => m.NavigateForFormsPages, o => o.NavigateForFormsPages); @@ -249,8 +254,11 @@ public override void DeployModel(object modelHost, DefinitionBase model) if (!dstUrl.StartsWith("/")) dstUrl = "/" + dstUrl; - if (!srcUrl.StartsWith("/")) + if (!srcUrl.StartsWith("/") + && !srcUrl.StartsWith("~")) + { srcUrl = "/" + srcUrl; + } srcUrl = srcUrl.ToLower(); dstUrl = dstUrl.ToLower(); @@ -265,7 +273,8 @@ public override void DeployModel(object modelHost, DefinitionBase model) isValid = srcUrl .Replace("~sitecollection", siteCollectionUrl) - .Replace("//", "/") == dstUrl; + .Replace("//", "/") + .EndsWith(dstUrl); } else if (s.DocumentTemplateUrl.Contains("~site")) { @@ -273,13 +282,19 @@ public override void DeployModel(object modelHost, DefinitionBase model) isValid = srcUrl .Replace("~site", siteCollectionUrl) - .Replace("//", "/") == dstUrl; + .Replace("//", "/") + .EndsWith(dstUrl); } else { isValid = dstUrl.EndsWith(srcUrl); } + if (isValid == false) + { + + } + return new PropertyValidationResult { Tag = p.Tag, diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/ListViewDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/ListViewDefinitionValidator.cs index d1b6129f5..3314504ee 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/ListViewDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/ListViewDefinitionValidator.cs @@ -33,6 +33,11 @@ public override void DeployModel(object modelHost, DefinitionBase model) .ShouldBeEqual(m => m.RowLimit, o => (int)o.RowLimit) .ShouldBeEqual(m => m.IsPaged, o => o.Paged); + if (definition.MobileDefaultView.HasValue) + assert.ShouldBeEqual(m => m.MobileDefaultView, o => o.MobileDefaultView); + else + assert.SkipProperty(m => m.MobileDefaultView, "MobileDefaultView is null or empty. Skipping."); + if (definition.InlineEdit.HasValue) assert.ShouldBeEqual(m => m.InlineEdit.ToString().ToLower(), o => o.InlineEdit.ToLower()); @@ -78,6 +83,8 @@ public override void DeployModel(object modelHost, DefinitionBase model) srcViewDate = Regex.Replace(srcViewDate, @"\r\n?|\n", string.Empty); dstViewDate = Regex.Replace(dstViewDate, @"\r\n?|\n", string.Empty); + srcViewDate = Regex.Replace(srcViewDate, @"\s+", string.Empty); + dstViewDate = Regex.Replace(dstViewDate, @"\s+", string.Empty); var isValid = srcViewDate.ToUpper() == dstViewDate.ToUpper(); diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/MasterPageSettingsDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/MasterPageSettingsDefinitionValidator.cs index d67f3f986..86b7b1b35 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/MasterPageSettingsDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/MasterPageSettingsDefinitionValidator.cs @@ -37,7 +37,7 @@ public override void DeployModel(object modelHost, DefinitionBase model) var srcProp = s.GetExpressionValue(def => def.SiteMasterPageUrl); var dstProp = d.GetExpressionValue(def => def.CustomMasterUrl); - var isValid = url == (string)dstProp.Value; + var isValid = ((string)dstProp.Value).EndsWith((string)url); return new PropertyValidationResult { @@ -70,7 +70,7 @@ public override void DeployModel(object modelHost, DefinitionBase model) var srcProp = s.GetExpressionValue(def => def.SystemMasterPageUrl); var dstProp = d.GetExpressionValue(def => def.MasterUrl); - var isValid = (string)url == (string)dstProp.Value; + var isValid = ((string)dstProp.Value).EndsWith((string)url); return new PropertyValidationResult { diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/OfficialFileHostDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/OfficialFileHostDefinitionValidator.cs new file mode 100644 index 000000000..2bcf28b87 --- /dev/null +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/OfficialFileHostDefinitionValidator.cs @@ -0,0 +1,98 @@ +using SPMeta2.Definitions.Base; +using SPMeta2.SSOM.ModelHandlers; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + +using SPMeta2.Utils; +using SPMeta2.SSOM.ModelHosts; +using SPMeta2.Definitions; +using SPMeta2.Containers.Assertion; + +namespace SPMeta2.Regression.SSOM.Validation +{ + public class OfficialFileHostDefinitionValidator : OfficialFileHostModelHandler + { + #region methods + + public override void DeployModel(object modelHost, DefinitionBase model) + { + var typedModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + var typedDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + var spObject = FindExistingObject(typedModelHost.HostWebApplication, typedDefinition); + + var assert = ServiceFactory.AssertService + .NewAssert(typedDefinition, spObject) + .ShouldNotBeNull(spObject) + .ShouldBeEqual(m => m.OfficialFileName, o => o.OfficialFileName) + .ShouldBeEqual(m => m.ShowOnSendToMenu, o => o.ShowOnSendToMenu); + + if (!string.IsNullOrEmpty(typedDefinition.Explanation)) + assert.ShouldBeEqual(m => m.Explanation, o => o.Explanation); + else + assert.SkipProperty(m => m.Explanation); + + if (!string.IsNullOrEmpty(typedDefinition.Explanation)) + assert.ShouldBeEqual(m => m.Explanation, o => o.Explanation); + else + assert.SkipProperty(m => m.Explanation); + + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.OfficialFileUrl); + var dstProp = d.GetExpressionValue(m => m.OfficialFileUrl); + + var isValid = srcProp.ToString() == dstProp.ToString(); + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = dstProp, + IsValid = isValid + }; + }); + + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.Action); + var dstProp = d.GetExpressionValue(m => m.Action); + + var isValid = srcProp.ToString() == dstProp.ToString(); + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = dstProp, + IsValid = isValid + }; + }); + + + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.CreateUniqueId); + var dstProp = d.GetExpressionValue(m => m.UniqueId); + + var isValid = s.CreateUniqueId + ? d.UniqueId != default(Guid) + : d.UniqueId == default(Guid); + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = dstProp, + IsValid = isValid + }; + }); + + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/SecurityGroupDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/SecurityGroupDefinitionValidator.cs index 7a875bd41..2cc9d52cb 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/SecurityGroupDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/SecurityGroupDefinitionValidator.cs @@ -14,13 +14,19 @@ namespace SPMeta2.Regression.SSOM.Validation { public class SecurityGroupDefinitionValidator : SecurityGroupModelHandler { - protected string GetSafeUserLoging(string userLoginString) + protected string GetSafeUserLogin(string userLoginString) { var result = userLoginString.ToString().ToUpper().Replace("\\", "/"); if (result.Contains("|")) result = result.Split('|')[1]; + if (result.Contains('\\')) + result = result.Split('\\')[1]; + + if (result.Contains('/')) + result = result.Split('/')[1]; + return result; } @@ -71,8 +77,8 @@ public override void DeployModel(object modelHost, DefinitionBase model) var srcProp = s.GetExpressionValue(def => def.Owner); var dstProp = d.GetExpressionValue(ct => ct.GetOwnerLogin()); - var srcUserLogin = GetSafeUserLoging(srcProp.Value.ToString()); - var dstsUserLogin = GetSafeUserLoging(dstProp.Value.ToString()); + var srcUserLogin = GetSafeUserLogin(srcProp.Value.ToString()); + var dstsUserLogin = GetSafeUserLogin(dstProp.Value.ToString()); var isValid = srcUserLogin == dstsUserLogin; @@ -105,8 +111,8 @@ public override void DeployModel(object modelHost, DefinitionBase model) foreach (var userName in userNames) { - var srcUserLogin = GetSafeUserLoging(srcProp.Value.ToString()); - var dstsUserLogin = GetSafeUserLoging(userName); + var srcUserLogin = GetSafeUserLogin(srcProp.Value.ToString()); + var dstsUserLogin = GetSafeUserLogin(userName); if (srcUserLogin == dstsUserLogin) { diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/SecurityRoleLinkDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/SecurityRoleLinkDefinitionValidator.cs index b0bffb91b..ed558137e 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/SecurityRoleLinkDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/SecurityRoleLinkDefinitionValidator.cs @@ -24,7 +24,18 @@ public override void DeployModel(object modelHost, DefinitionBase model) var securableObject = modelHostContext.SecurableObject; var securityGroup = modelHostContext.SecurityGroup; - var securityRole = ResolveSecurityRole(ExtractWeb(securableObject), definition); + SPWeb web = null; + + if (securableObject != null) + web = ExtractWeb(securableObject); + else + web = securityGroup.ParentWeb; + + var securityRole = ResolveSecurityRole(web, definition); + + // security group -> roles + if (securableObject == null) + securableObject = web; var roleAssignments = securableObject.RoleAssignments; var spObject = roleAssignments.OfType() diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/SuiteBarDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/SuiteBarDefinitionValidator.cs new file mode 100644 index 000000000..5fdb1ac7b --- /dev/null +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/SuiteBarDefinitionValidator.cs @@ -0,0 +1,36 @@ +using SPMeta2.Definitions.Base; +using SPMeta2.SSOM.ModelHandlers; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + +using SPMeta2.Utils; +using SPMeta2.SSOM.ModelHosts; +using SPMeta2.Definitions; +using SPMeta2.Containers.Assertion; + +namespace SPMeta2.Regression.SSOM.Validation +{ + public class SuiteBarDefinitionValidator : SuiteBarModelHandler + { + #region methods + + public override void DeployModel(object modelHost, DefinitionBase model) + { + var typedModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + var typedDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + var spObject = typedModelHost.HostWebApplication; + + var assert = ServiceFactory.AssertService + .NewAssert(typedDefinition, spObject) + .ShouldNotBeNull(spObject) + .ShouldBeEqual(m => m.SuiteBarBrandingElementHtml, o => o.SuiteBarBrandingElementHtml); + + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/WebPartDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/WebPartDefinitionValidator.cs index 92524a852..4ddecffa8 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/WebPartDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/WebPartDefinitionValidator.cs @@ -416,6 +416,11 @@ public override void DeployModel(object modelHost, DefinitionBase model) assert.ShouldBeEqual(m => m.AuthorizationFilter, o => o.AuthorizationFilter); else assert.SkipProperty(m => m.AuthorizationFilter, "AuthorizationFilter is null or empty. Skipping."); + + if (definition.Hidden.HasValue) + assert.ShouldBeEqual(m => m.Hidden, o => o.Hidden); + else + assert.SkipProperty(m => m.Hidden, "Hidden is null or empty. Skipping."); }); } diff --git a/SPMeta2/SPMeta2.Regression.Tests/Containers/Farm/SPMeta2.Containers.FarmSolutionWebAppContainer.wsp b/SPMeta2/SPMeta2.Regression.Tests/Containers/Farm/SPMeta2.Containers.FarmSolutionWebAppContainer.wsp new file mode 100644 index 000000000..83c3dbbb6 Binary files /dev/null and b/SPMeta2/SPMeta2.Regression.Tests/Containers/Farm/SPMeta2.Containers.FarmSolutionWebAppContainer.wsp differ diff --git a/SPMeta2/SPMeta2.Regression.Tests/Containers/Farm/SPMeta2.Containers.FarmSolutionWebAppContainer1.wsp b/SPMeta2/SPMeta2.Regression.Tests/Containers/Farm/SPMeta2.Containers.FarmSolutionWebAppContainer1.wsp new file mode 100644 index 000000000..e29670d30 Binary files /dev/null and b/SPMeta2/SPMeta2.Regression.Tests/Containers/Farm/SPMeta2.Containers.FarmSolutionWebAppContainer1.wsp differ diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/ModelAPI/SPMeta2ModelTests.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/ModelAPI/SPMeta2ModelTests.cs index 4fe4ce32d..ff469fa65 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/ModelAPI/SPMeta2ModelTests.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/ModelAPI/SPMeta2ModelTests.cs @@ -13,6 +13,7 @@ using SPMeta2.Containers.Utils; using SPMeta2.Enumerations; using SPMeta2.Models; +using SPMeta2.Extensions; namespace SPMeta2.Regression.Tests.Impl.ModelAPI { @@ -198,6 +199,9 @@ public void Should_Pass_On_Valid_SSOM_CSOM() // both CSOM / SSOM Assert.IsTrue(SPMeta2Model.IsCSOMCompatible(model)); Assert.IsTrue(SPMeta2Model.IsSSOMCompatible(model)); + + Assert.IsTrue(model.IsCSOMCompatible()); + Assert.IsTrue(model.IsSSOMCompatible()); } [TestMethod] @@ -213,6 +217,9 @@ public void Should_Pass_On_Valid_SSOM_Invalid_CSOM() // - CSOM / + SSOM Assert.IsFalse(SPMeta2Model.IsCSOMCompatible(model)); Assert.IsTrue(SPMeta2Model.IsSSOMCompatible(model)); + + Assert.IsFalse(model.IsCSOMCompatible()); + Assert.IsTrue(model.IsSSOMCompatible()); } [TestMethod] @@ -228,6 +235,9 @@ public void Should_Pass_On_Valid_SSOM_Invalid_CSOM_2() // - CSOM / + SSOM Assert.IsFalse(SPMeta2Model.IsCSOMCompatible(model)); Assert.IsTrue(SPMeta2Model.IsSSOMCompatible(model)); + + Assert.IsFalse(model.IsCSOMCompatible()); + Assert.IsTrue(model.IsSSOMCompatible()); } #endregion diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/ModelNodes/ModelNodesTests.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/ModelNodes/ModelNodesTests.cs index d2d4eb426..6108f3de8 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/ModelNodes/ModelNodesTests.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/ModelNodes/ModelNodesTests.cs @@ -83,5 +83,47 @@ public void Can_Use_ModelNode_SetNonPersistentPropertyBagValue() } #endregion + + #region compatibility + + [TestMethod] + [TestCategory("Regression.ModelNodes.Compatibility")] + [TestCategory("CI.Core")] + public void Should_Pass_On_Valid_SSOM_CSOM() + { + var validDefinitions = new DefinitionBase[]{ + new FieldDefinition(), + new WebDefinition(), + new ListDefinition(), + }; + + // both CSOM / SSOM + foreach (var def in validDefinitions) + { + Assert.IsTrue(def.IsCSOMCompatible()); + Assert.IsTrue(def.IsSSOMCompatible()); + } + } + + [TestMethod] + [TestCategory("Regression.ModelNodes.Compatibility")] + [TestCategory("CI.Core")] + public void Should_Pass_On_Valid_SSOM_Invalid_CSOM() + { + var validDefinitions = new DefinitionBase[]{ + new FarmDefinition(), + new WebApplicationDefinition(), + new SiteDefinition() + }; + + // both CSOM / SSOM + foreach (var def in validDefinitions) + { + Assert.IsFalse(def.IsCSOMCompatible()); + Assert.IsTrue(def.IsSSOMCompatible()); + } + } + + #endregion } } diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Random/RandomDefinitionTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Random/RandomDefinitionTest.cs index bd9782694..23f035448 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Random/RandomDefinitionTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Random/RandomDefinitionTest.cs @@ -672,6 +672,26 @@ public void CanDeployRandom_ContentTypeFieldLinkDefinition() TestRandomDefinition(); } + [TestMethod] + [TestCategory("Regression.Rnd.WebApplication")] + public void CanDeployRandom_OfficialFileHostDefinition() + { + WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => + { + TestRandomDefinition(); + }); + } + + [TestMethod] + [TestCategory("Regression.Rnd.WebApplication")] + public void CanDeployRandom_SuiteBarDefinition() + { + WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => + { + TestRandomDefinition(); + }); + } + #endregion #region web scope diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ContentTypeScenariosTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ContentTypeScenariosTest.cs index d224c4580..00be0b94b 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ContentTypeScenariosTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ContentTypeScenariosTest.cs @@ -779,5 +779,65 @@ protected ContentTypeDefinition GetLocalizedDefinition() } #endregion + + #region addint out of the box content types + + [TestMethod] + [TestCategory("Regression.Scenarios.ContentTypes.OOTB")] + public void CanDeploy_Item_ContentType_To_List() + { + // "Item" ContentTypeLink #1016 + // https://github.com/SubPointSolutions/spmeta2/issues/1016 + + var announcementList = ModelGeneratorService.GetRandomDefinition(def => + { + def.TemplateType = BuiltInListTemplateTypeId.Announcements; + def.ContentTypesEnabled = true; + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddList(announcementList, list => + { + list.AddContentTypeLink(new ContentTypeLinkDefinition + { + ContentTypeId = BuiltInContentTypeId.Item, + ContentTypeName = "Item" + }); + }); + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.ContentTypes.OOTB")] + public void CanDeploy_Item_ContentType_To_Library() + { + // "Item" ContentTypeLink #1016 + // https://github.com/SubPointSolutions/spmeta2/issues/1016 + + var announcementList = ModelGeneratorService.GetRandomDefinition(def => + { + def.TemplateType = BuiltInListTemplateTypeId.DocumentLibrary; + def.ContentTypesEnabled = true; + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddList(announcementList, list => + { + list.AddContentTypeLink(new ContentTypeLinkDefinition + { + ContentTypeId = BuiltInContentTypeId.Item, + ContentTypeName = "Item" + }); + }); + }); + + TestModel(model); + } + + #endregion } } diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/FarmSolutionScenariosTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/FarmSolutionScenariosTest.cs index ae63b9162..22190f97e 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/FarmSolutionScenariosTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/FarmSolutionScenariosTest.cs @@ -15,6 +15,10 @@ using SPMeta2.Standard.Definitions; using SPMeta2.Syntax.Default; using SPMeta2.Validation.Validators.Relationships; +using SPMeta2.Containers.Consts; +using System.IO; + +using SPMeta2.Containers.Extensions; namespace SPMeta2.Regression.Tests.Impl.Scenarios { @@ -50,373 +54,812 @@ public static void Cleanup() #region default [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Default")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Default")] public void CanDeploy_FarmSolution_As_Default() { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(false, def => { }); - TestFarmSolutionModel(solutionDef); + TestFarmSolutionModel(solutionDef, false); }); } - #endregion + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Default")] + public void CanDeploy_FarmSolution_As_Default_UnderWebApplication() + { + WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => + { + var solutionDef = GetFarmSolutionDefinition(true, def => + { - #region add operations + }); + + TestFarmSolutionModel(solutionDef, true); + }); + } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Add")] - public void CanDeploy_FarmSolution_As_Add_FromDeleted_State() + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Default")] + public void CanDeploy_FarmSolution_As_Default_UnderTwoWebApplication() { + // the same wsp package is to be deployed under different web app + // checking that the same *.wsp package can be sfaely deployed under two web app + // such deployment and retraction should only be scoped to a particular web app not affecting other web app deployments + WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var webApp1 = ModelGeneratorService.GetRandomDefinition(def => { + def.Port = 31401; + def.UseSecureSocketsLayer = false; + }); + var webApp2 = ModelGeneratorService.GetRandomDefinition(def => + { + def.Port = 31402; + def.UseSecureSocketsLayer = false; }); - PrepareDeletedState(solutionDef); + var solutionDef1 = GetFarmSolutionDefinition(true, def => + { + //def.ShouldRetract = true; + def.ShouldDeploy = true; + }); - TestFarmSolutionModel(solutionDef); + var solutionDef2 = GetFarmSolutionDefinition(true, def => + { + // the same wsp package is to be deployed under different web app + def.FileName = solutionDef1.FileName; + + //def.ShouldRetract = true; + def.ShouldDeploy = true; + }); + + var farmModel = SPMeta2Model.NewFarmModel(farm => + { + farm.AddWebApplication(webApp1, webApp => + { + webApp.RegExcludeFromValidation(); + + webApp.AddFarmSolution(solutionDef1, solution => + { + + }); + }); + + + farm.AddWebApplication(webApp2, webApp => + { + webApp.RegExcludeFromValidation(); + + webApp.AddFarmSolution(solutionDef2, solution => + { + + }); + }); + + }); + + TestModel(farmModel); }); } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Add")] - public void CanDeploy_FarmSolution_As_Add_FromRetracted_State() + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Default")] + public void CanDeploy_FarmSolution_As_Upgrade_UnderTwoWebApplication() + { + // the same wsp package is to be deployed under different web app + // checking that the same *.wsp package can be sfaely deployed under two web app + // such deployment and retraction should only be scoped to a particular web app not affecting other web app deployments + + WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => + { + var webApp1 = ModelGeneratorService.GetRandomDefinition(def => + { + def.Port = 31401; + def.UseSecureSocketsLayer = false; + }); + + var webApp2 = ModelGeneratorService.GetRandomDefinition(def => + { + def.Port = 31402; + def.UseSecureSocketsLayer = false; + }); + + var solutionDef1 = GetFarmSolutionDefinition(true, def => + { + def.ShouldUpgrade = true; + def.ShouldDeploy = true; + }); + + var solutionDef2 = GetFarmSolutionDefinition(true, def => + { + // the same wsp package is to be deployed under different web app + def.FileName = solutionDef1.FileName; + + def.ShouldUpgrade = true; + def.ShouldDeploy = true; + }); + + var farmModel = SPMeta2Model.NewFarmModel(farm => + { + farm.AddWebApplication(webApp1, webApp => + { + webApp.RegExcludeFromValidation(); + + webApp.AddFarmSolution(solutionDef1, solution => + { + + }); + }); + + + farm.AddWebApplication(webApp2, webApp => + { + webApp.RegExcludeFromValidation(); + + webApp.AddFarmSolution(solutionDef2, solution => + { + + }); + }); + + }); + + TestModel(farmModel); + }); + } + + #endregion + + #region add operations + + public void CanDeploy_FarmSolution_As_Add_FromDeleted_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { }); - PrepareRetractedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareDeletedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Add")] - public void CanDeploy_FarmSolution_As_Add_FromAdded_State() + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Add")] + public void CanDeploy_FarmSolution_As_Add_FromDeleted_State() + { + CanDeploy_FarmSolution_As_Add_FromDeleted_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Add")] + public void CanDeploy_FarmSolution_As_Add_FromDeleted_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Add_FromDeleted_State_Internal(true); + } + + protected FarmSolutionDefinition GetFarmSolutionDefinition(bool isWebApplication, Action action) + { + var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + { + action(def); + }); + + if (isWebApplication) + { + solutionDef.SolutionId = DefaultContainers.FarmSolutionWebScope.SolutionId; + solutionDef.Content = File.ReadAllBytes(DefaultContainers.FarmSolutionWebScope.FilePath); + } + + return solutionDef; + } + + public void CanDeploy_FarmSolution_As_Add_FromRetracted_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { }); - PrepareAddedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareRetractedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Add")] - public void CanDeploy_FarmSolution_As_Add_FromDeployed_State() + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Add")] + public void CanDeploy_FarmSolution_As_Add_FromRetracted_State() + { + CanDeploy_FarmSolution_As_Add_FromRetracted_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Add")] + public void CanDeploy_FarmSolution_As_Add_FromRetracted_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Add_FromRetracted_State_Internal(true); + } + + public void CanDeploy_FarmSolution_As_Add_FromAdded_State_Internal(bool isWebApplication) + { + WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => + { + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => + { + + }); + + PrepareAddedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); + }); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Add")] + public void CanDeploy_FarmSolution_As_Add_FromAdded_State() + { + CanDeploy_FarmSolution_As_Add_FromAdded_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Add")] + public void CanDeploy_FarmSolution_As_Add_FromAdded_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Add_FromAdded_State_Internal(true); + } + + public void CanDeploy_FarmSolution_As_Add_FromDeployed_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { }); - PrepareDeployedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareDeployedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Add")] + public void CanDeploy_FarmSolution_As_Add_FromDeployed_State() + { + CanDeploy_FarmSolution_As_Add_FromDeployed_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Add")] + public void CanDeploy_FarmSolution_As_Add_FromDeployed_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Add_FromDeployed_State_Internal(true); + } + #endregion #region delete operations - [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Delete")] - public void CanDeploy_FarmSolution_As_Delete_FromDeleted_State() + public void CanDeploy_FarmSolution_As_Delete_FromDeleted_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldDelete = true; def.ShouldAdd = false; }); - PrepareDeletedState(solutionDef); - - TestFarmSolutionModel(solutionDef); + PrepareDeletedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Delete")] - public void CanDeploy_FarmSolution_As_Delete_FromRetracted_State() + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Delete")] + public void CanDeploy_FarmSolution_As_Delete_FromDeleted_State() + { + CanDeploy_FarmSolution_As_Delete_FromDeleted_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Delete")] + public void CanDeploy_FarmSolution_As_Delete_FromDeleted_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Delete_FromDeleted_State_Internal(true); + } + + public void CanDeploy_FarmSolution_As_Delete_FromRetracted_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldDelete = true; def.ShouldAdd = false; }); - PrepareRetractedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareRetractedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Delete")] - public void CanDeploy_FarmSolution_As_Delete_FromAdded_State() + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Delete")] + public void CanDeploy_FarmSolution_As_Delete_FromRetracted_State() + { + CanDeploy_FarmSolution_As_Delete_FromRetracted_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Delete")] + public void CanDeploy_FarmSolution_As_Delete_FromRetracted_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Delete_FromRetracted_State_Internal(true); + } + + public void CanDeploy_FarmSolution_As_Delete_FromAdded_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldDelete = true; def.ShouldAdd = false; }); - PrepareAddedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareAddedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Delete")] - public void CanDeploy_FarmSolution_As_Delete_FromDeployed_State() + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Delete")] + public void CanDeploy_FarmSolution_As_Delete_FromAdded_State() + { + CanDeploy_FarmSolution_As_Delete_FromAdded_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Delete")] + public void CanDeploy_FarmSolution_As_Delete_FromAdded_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Delete_FromAdded_State_Internal(true); + } + + public void CanDeploy_FarmSolution_As_Delete_FromDeployed_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldDelete = true; def.ShouldAdd = false; }); - PrepareDeployedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareDeployedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Delete")] + public void CanDeploy_FarmSolution_As_Delete_FromDeployed_State() + { + CanDeploy_FarmSolution_As_Delete_FromDeployed_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Delete")] + public void CanDeploy_FarmSolution_As_Delete_FromDeployed_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Delete_FromDeployed_State_Internal(true); + } + #endregion #region retract operations - [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Retract")] - public void CanDeploy_FarmSolution_As_Retract_FromDeleted_State() + public void CanDeploy_FarmSolution_As_Retract_FromDeleted_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldRetract = true; }); - PrepareDeletedState(solutionDef); - - TestFarmSolutionModel(solutionDef); + PrepareDeletedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Retract")] - public void CanDeploy_FarmSolution_As_Retract_FromRetracted_State() + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Retract")] + public void CanDeploy_FarmSolution_As_Retract_FromDeleted_State() + { + CanDeploy_FarmSolution_As_Retract_FromDeleted_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Retract")] + public void CanDeploy_FarmSolution_As_Retract_FromDeleted_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Retract_FromDeleted_State_Internal(true); + } + + public void CanDeploy_FarmSolution_As_Retract_FromRetracted_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldRetract = true; }); - PrepareRetractedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareRetractedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Retract")] - public void CanDeploy_FarmSolution_As_Retract_FromAdded_State() + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Retract")] + public void CanDeploy_FarmSolution_As_Retract_FromRetracted_State() + { + CanDeploy_FarmSolution_As_Retract_FromRetracted_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Retract")] + public void CanDeploy_FarmSolution_As_Retract_FromRetracted_State_UnderWbApplication() + { + CanDeploy_FarmSolution_As_Retract_FromRetracted_State_Internal(true); + } + + public void CanDeploy_FarmSolution_As_Retract_FromAdded_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldRetract = true; }); - PrepareAddedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareAddedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Retract")] - public void CanDeploy_FarmSolution_As_Retract_FromDeployed_State() + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Retract")] + public void CanDeploy_FarmSolution_As_Retract_FromAdded_State() + { + CanDeploy_FarmSolution_As_Retract_FromAdded_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Retract")] + public void CanDeploy_FarmSolution_As_Retract_FromAdded_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Retract_FromAdded_State_Internal(true); + } + + public void CanDeploy_FarmSolution_As_Retract_FromDeployed_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldRetract = true; }); - PrepareDeployedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareDeployedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Retract")] + public void CanDeploy_FarmSolution_As_Retract_FromDeployed_State() + { + CanDeploy_FarmSolution_As_Retract_FromDeployed_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Retract")] + public void CanDeploy_FarmSolution_As_Retract_FromDeployed_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Retract_FromDeployed_State_Internal(true); + } + #endregion #region deploy operations - [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Deploy")] - public void CanDeploy_FarmSolution_As_Deploy_FromDeleted_State() + public void CanDeploy_FarmSolution_As_Deploy_FromDeleted_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldDeploy = true; }); - PrepareDeletedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareDeletedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Deploy")] - public void CanDeploy_FarmSolution_As_Deploy_FromRetracted_State() + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Deploy")] + public void CanDeploy_FarmSolution_As_Deploy_FromDeleted_State() + { + CanDeploy_FarmSolution_As_Deploy_FromDeleted_State_Internal(false); + } + + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Deploy")] + public void CanDeploy_FarmSolution_As_Deploy_FromDeleted_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Deploy_FromDeleted_State_Internal(true); + } + + public void CanDeploy_FarmSolution_As_Deploy_FromRetracted_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldDeploy = true; }); - PrepareRetractedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareRetractedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Deploy")] - public void CanDeploy_FarmSolution_As_Deploy_FromAdded_State() + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Deploy")] + public void CanDeploy_FarmSolution_As_Deploy_FromRetracted_State() + { + CanDeploy_FarmSolution_As_Deploy_FromRetracted_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Deploy")] + public void CanDeploy_FarmSolution_As_Deploy_FromRetracted_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Deploy_FromRetracted_State_Internal(true); + } + + public void CanDeploy_FarmSolution_As_Deploy_FromAdded_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldDeploy = true; }); - PrepareAddedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareAddedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Deploy")] - public void CanDeploy_FarmSolution_As_Deploy_FromDeployed_State() + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Deploy")] + public void CanDeploy_FarmSolution_As_Deploy_FromAdded_State() + { + CanDeploy_FarmSolution_As_Deploy_FromAdded_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Deploy")] + public void CanDeploy_FarmSolution_As_Deploy_FromAdded_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Deploy_FromAdded_State_Internal(true); + } + + public void CanDeploy_FarmSolution_As_Deploy_FromDeployed_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldDeploy = true; }); - PrepareDeployedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareDeployedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.Farm")] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Deploy")] + public void CanDeploy_FarmSolution_As_Deploy_FromDeployed_State() + { + CanDeploy_FarmSolution_As_Deploy_FromDeployed_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication")] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Deploy")] + public void CanDeploy_FarmSolution_As_Deploy_FromDeployed_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Deploy_FromDeployed_State_Internal(true); + } + #endregion #region upgrade operations - [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Upgrade")] - public void CanDeploy_FarmSolution_As_Upgrade_FromDeleted_State() + public void CanDeploy_FarmSolution_As_Upgrade_FromDeleted_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldUpgrade = true; }); - PrepareDeletedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareDeletedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Upgrade")] - public void CanDeploy_FarmSolution_As_Upgrade_FromRetracted_State() + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Upgrade")] + public void CanDeploy_FarmSolution_As_Upgrade_FromDeleted_State() + { + CanDeploy_FarmSolution_As_Upgrade_FromDeleted_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Upgrade")] + public void CanDeploy_FarmSolution_As_Upgrade_FromDeleted_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Upgrade_FromDeleted_State_Internal(true); + } + + public void CanDeploy_FarmSolution_As_Upgrade_FromRetracted_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldUpgrade = true; }); - PrepareRetractedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareRetractedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Upgrade")] - public void CanDeploy_FarmSolution_As_Upgrade_FromAdded_State() + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Upgrade")] + public void CanDeploy_FarmSolution_As_Upgrade_FromRetracted_State() + { + CanDeploy_FarmSolution_As_Upgrade_FromRetracted_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Upgrade")] + public void CanDeploy_FarmSolution_As_Upgrade_FromRetracted_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Upgrade_FromRetracted_State_Internal(true); + } + + public void CanDeploy_FarmSolution_As_Upgrade_FromAdded_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldUpgrade = true; }); - PrepareAddedState(solutionDef); + PrepareAddedState(solutionDef, isWebApplication); //TestFarmSolutionModel(solutionDef); }); } [TestMethod] - [TestCategory("Regression.Scenarios.FarmSolution.Upgrade")] - public void CanDeploy_FarmSolution_As_Upgrade_FromDeployed_State() + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Upgrade")] + public void CanDeploy_FarmSolution_As_Upgrade_FromAdded_State() + { + CanDeploy_FarmSolution_As_Upgrade_FromAdded_State_Internal(false); + } + + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Upgrade")] + public void CanDeploy_FarmSolution_As_Upgrade_FromAdded_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Upgrade_FromAdded_State_Internal(true); + } + + public void CanDeploy_FarmSolution_As_Upgrade_FromDeployed_State_Internal(bool isWebApplication) { WithExpectedUnsupportedCSOMnO365RunnerExceptions(() => { - var solutionDef = ModelGeneratorService.GetRandomDefinition(def => + var solutionDef = GetFarmSolutionDefinition(isWebApplication, def => { def.ShouldUpgrade = true; }); - PrepareDeployedState(solutionDef); - TestFarmSolutionModel(solutionDef); + PrepareDeployedState(solutionDef, isWebApplication); + TestFarmSolutionModel(solutionDef, isWebApplication); }); } + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.Farm.Upgrade")] + public void CanDeploy_FarmSolution_As_Upgrade_FromDeployed_State() + { + CanDeploy_FarmSolution_As_Upgrade_FromDeployed_State_Internal(false); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.FarmSolution.WebApplication.Upgrade")] + public void CanDeploy_FarmSolution_As_Upgrade_FromDeployed_State_UnderWebApplication() + { + CanDeploy_FarmSolution_As_Upgrade_FromDeployed_State_Internal(true); + } + #endregion #region utils - private void PrepareDeployedState(FarmSolutionDefinition solutionDef) + private void PrepareDeployedState(FarmSolutionDefinition solutionDef, + bool isWebAcpplication) { var deployDef = solutionDef.Inherit(def => { @@ -428,10 +871,11 @@ private void PrepareDeployedState(FarmSolutionDefinition solutionDef) def.ShouldDeploy = true; }); - TestFarmSolutionModel(deployDef); + TestFarmSolutionModel(deployDef, isWebAcpplication); } - private void PrepareAddedState(FarmSolutionDefinition solutionDef) + private void PrepareAddedState(FarmSolutionDefinition solutionDef, + bool isWebApplication) { var addDef = solutionDef.Inherit(def => { @@ -443,7 +887,7 @@ private void PrepareAddedState(FarmSolutionDefinition solutionDef) def.ShouldRetract = null; }); - TestFarmSolutionModel(addDef); + TestFarmSolutionModel(addDef, isWebApplication); var retractDef = solutionDef.Inherit(def => { @@ -455,10 +899,11 @@ private void PrepareAddedState(FarmSolutionDefinition solutionDef) def.ShouldRetract = true; }); - TestFarmSolutionModel(retractDef); + TestFarmSolutionModel(retractDef, isWebApplication); } - private void PrepareRetractedState(FarmSolutionDefinition solutionDef) + private void PrepareRetractedState(FarmSolutionDefinition solutionDef, + bool isWebApplication) { var deployDef = solutionDef.Inherit(def => { @@ -480,11 +925,12 @@ private void PrepareRetractedState(FarmSolutionDefinition solutionDef) def.ShouldRetract = true; }); - TestFarmSolutionModel(deployDef); - TestFarmSolutionModel(retractDef); + TestFarmSolutionModel(deployDef, isWebApplication); + TestFarmSolutionModel(retractDef, isWebApplication); } - private void PrepareDeletedState(FarmSolutionDefinition solutionDef) + private void PrepareDeletedState(FarmSolutionDefinition solutionDef, + bool isWebApplication) { var deletedDef = solutionDef.Inherit(def => { @@ -496,25 +942,43 @@ private void PrepareDeletedState(FarmSolutionDefinition solutionDef) def.ShouldDelete = true; }); - TestFarmSolutionModel(deletedDef); + TestFarmSolutionModel(deletedDef, isWebApplication); } - protected virtual void TestFarmSolutionModel(FarmSolutionDefinition solutionDef) + protected virtual void TestFarmSolutionModel(FarmSolutionDefinition solutionDef, bool isWebApplicationLevel) { var newSolutiondef = solutionDef.Inherit(); - var originalModel = SPMeta2Model.NewFarmModel(farm => + if (isWebApplicationLevel) { - farm.AddFarmSolution(solutionDef); - }); + var originalModel = SPMeta2Model.NewWebApplicationModel(webApp => + { + webApp.AddFarmSolution(solutionDef); + }); - var newModel = SPMeta2Model.NewFarmModel(farm => + var newModel = SPMeta2Model.NewWebApplicationModel(farm => + { + farm.AddFarmSolution(newSolutiondef); + }); + + TestModel(originalModel); + TestModel(newModel); + } + else { - farm.AddFarmSolution(newSolutiondef); - }); + var originalModel = SPMeta2Model.NewFarmModel(farm => + { + farm.AddFarmSolution(solutionDef); + }); + + var newModel = SPMeta2Model.NewFarmModel(farm => + { + farm.AddFarmSolution(newSolutiondef); + }); - TestModel(originalModel); - TestModel(newModel); + TestModel(originalModel); + TestModel(newModel); + } } #endregion diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/Fields/LookupFieldScenariousTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/Fields/LookupFieldScenariousTest.cs index 85b3dfaa2..9ee46e1ab 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/Fields/LookupFieldScenariousTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/Fields/LookupFieldScenariousTest.cs @@ -1,885 +1,1022 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using SPMeta2.BuiltInDefinitions; -using SPMeta2.Containers; - -using SPMeta2.Definitions; -using SPMeta2.Definitions.Fields; -using SPMeta2.Enumerations; -using SPMeta2.Exceptions; -using SPMeta2.Models; -using SPMeta2.Regression.Tests.Impl.Scenarios.Base; -using SPMeta2.Regression.Tests.Utils; -using SPMeta2.Syntax.Default; -using SPMeta2.Syntax.Default.Modern; -using SPMeta2.Utils; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using SPMeta2.BuiltInDefinitions; +using SPMeta2.Containers; + +using SPMeta2.Definitions; +using SPMeta2.Definitions.Fields; +using SPMeta2.Enumerations; +using SPMeta2.Exceptions; +using SPMeta2.Models; +using SPMeta2.Regression.Tests.Impl.Scenarios.Base; +using SPMeta2.Regression.Tests.Utils; +using SPMeta2.Syntax.Default; +using SPMeta2.Syntax.Default.Modern; +using SPMeta2.Utils; using SPMeta2.Definitions.ContentTypes; -using SPMeta2.Regression.Tests.Extensions; - -namespace SPMeta2.Regression.Tests.Impl.Scenarios.Fields -{ - [TestClass] - public class LookupFieldScenariousTest : SPMeta2RegresionScenarioTestBase - { - #region internal - - [ClassInitialize] - public static void Init(TestContext context) - { - InternalInit(); - } - - [ClassCleanup] - public static void Cleanup() - { - InternalCleanup(); - } - - #endregion - - #region single select - - protected LookupFieldDefinition GetSingleSelectLookupDefinition() - { - return GetSingleSelectLookupDefinition(null); - } - - protected LookupFieldDefinition GetSingleSelectLookupDefinition(Action action) - { - var result = ModelGeneratorService.GetRandomDefinition(def => - { - def.ShowInNewForm = true; - def.Hidden = false; - def.Required = false; - def.AllowMultipleValues = false; - }); - - if (action != null) - action(result); - - return result; - } - - protected class LookupFieldEnvironment - { - public ModelNode ChildListModel { get; set; } - public ModelNode MasterListModel { get; set; } - - public ModelNode SiteModel { get; set; } - - public ModelNode WebModel { get; set; } - - public LookupFieldDefinition LookupField { get; set; } - - public ListDefinition ChildList { get; set; } - public ListDefinition MasterList { get; set; } - - public ModelNode ChildListNode { get; set; } - } - - protected LookupFieldEnvironment GetLookupFieldEnvironment(Action action) - { - return GetLookupFieldEnvironment(action, null); - } - - protected LookupFieldEnvironment GetLookupFieldEnvironment(Action action, - WebDefinition destinationWebDefinition) - { - var result = new LookupFieldEnvironment(); - - var dataList = ModelGeneratorService.GetRandomDefinition(def => - { - def.TemplateType = BuiltInListTemplateTypeId.GenericList; - }); - - var masterList = ModelGeneratorService.GetRandomDefinition(def => - { - def.TemplateType = BuiltInListTemplateTypeId.GenericList; - }); - - var lookupField = GetSingleSelectLookupDefinition(def => - { - def.Indexed = false; - //def.LookupListTitle = dataList.Title; - }); - - ModelNode childListNode = null; - - var siteModel = SPMeta2Model.NewSiteModel(site => - { - site.AddField(lookupField); - }); - - var webModel = SPMeta2Model.NewWebModel(web => - { - web.AddField(lookupField); - }); - - var childWebModel = SPMeta2Model.NewWebModel(web => - { - if (destinationWebDefinition != null) - { - web.AddWeb(destinationWebDefinition, subWeb => - { - subWeb.AddList(dataList, list => - { - childListNode = list; - - list - .AddRandomListItem() - .AddRandomListItem() - .AddRandomListItem(); - }); - }); - } - else - { - web.AddList(dataList, list => - { - childListNode = list; - - list - .AddRandomListItem() - .AddRandomListItem() - .AddRandomListItem(); - }); - } - }); - - var masterWebModel = SPMeta2Model.NewWebModel(web => - { - web.AddList(masterList, list => - { - list.AddListFieldLink(lookupField); - }); - }); - - result.LookupField = lookupField; - - result.ChildList = dataList; - result.ChildListNode = childListNode; - result.ChildListModel = childWebModel; - - - result.MasterList = masterList; - result.MasterListModel = masterWebModel; - - result.SiteModel = siteModel; - result.WebModel = webModel; - - if (action != null) - action(result); - - return result; - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] - public void CanDeploy_LookupField_AsEmptySingleSelect() - { - var field = GetSingleSelectLookupDefinition(def => - { - def.LookupListTitle = string.Empty; - def.LookupListUrl = string.Empty; - def.LookupList = string.Empty; - }); - - var siteModel = SPMeta2Model.NewSiteModel(site => - { - site.AddField(field); - }); - - TestModel(siteModel); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] - public void CanDeploy_LookupField_AsSingleSelect() - { - var field = GetSingleSelectLookupDefinition(); - - var siteModel = SPMeta2Model.NewSiteModel(site => - { - site.AddField(field); - }); - - TestModel(siteModel); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] - public void CanDeploy_LookupField_AsSingleSelectAndBindToListByTitle() - { - WithDisabledPropertyUpdateValidation(() => - { - var lookupEnvironment = GetLookupFieldEnvironment(env => - { - env.LookupField.LookupListTitle = env.ChildList.Title; - }); - +using SPMeta2.Regression.Tests.Extensions; + +namespace SPMeta2.Regression.Tests.Impl.Scenarios.Fields +{ + [TestClass] + public class LookupFieldScenariousTest : SPMeta2RegresionScenarioTestBase + { + #region internal + + [ClassInitialize] + public static void Init(TestContext context) + { + InternalInit(); + } + + [ClassCleanup] + public static void Cleanup() + { + InternalCleanup(); + } + + #endregion + + #region single select + + protected LookupFieldDefinition GetSingleSelectLookupDefinition() + { + return GetSingleSelectLookupDefinition(null); + } + + protected LookupFieldDefinition GetSingleSelectLookupDefinition(Action action) + { + var result = ModelGeneratorService.GetRandomDefinition(def => + { + def.ShowInNewForm = true; + def.Hidden = false; + def.Required = false; + def.AllowMultipleValues = false; + }); + + if (action != null) + action(result); + + return result; + } + + protected class LookupFieldEnvironment + { + public ModelNode ChildListModel { get; set; } + public ModelNode MasterListModel { get; set; } + + public ModelNode SiteModel { get; set; } + + public ModelNode WebModel { get; set; } + + public LookupFieldDefinition LookupField { get; set; } + + public ListDefinition ChildList { get; set; } + public ListDefinition MasterList { get; set; } + + public ModelNode ChildListNode { get; set; } + } + + protected LookupFieldEnvironment GetLookupFieldEnvironment(Action action) + { + return GetLookupFieldEnvironment(action, null); + } + + protected LookupFieldEnvironment GetLookupFieldEnvironment(Action action, + WebDefinition destinationWebDefinition) + { + var result = new LookupFieldEnvironment(); + + var dataList = ModelGeneratorService.GetRandomDefinition(def => + { + def.TemplateType = BuiltInListTemplateTypeId.GenericList; + }); + + var masterList = ModelGeneratorService.GetRandomDefinition(def => + { + def.TemplateType = BuiltInListTemplateTypeId.GenericList; + }); + + var lookupField = GetSingleSelectLookupDefinition(def => + { + def.Indexed = false; + //def.LookupListTitle = dataList.Title; + }); + + ModelNode childListNode = null; + + var siteModel = SPMeta2Model.NewSiteModel(site => + { + site.AddField(lookupField); + }); + + var webModel = SPMeta2Model.NewWebModel(web => + { + web.AddField(lookupField); + }); + + var childWebModel = SPMeta2Model.NewWebModel(web => + { + if (destinationWebDefinition != null) + { + web.AddWeb(destinationWebDefinition, subWeb => + { + subWeb.AddList(dataList, list => + { + childListNode = list; + + list + .AddRandomListItem() + .AddRandomListItem() + .AddRandomListItem(); + }); + }); + } + else + { + web.AddList(dataList, list => + { + childListNode = list; + + list + .AddRandomListItem() + .AddRandomListItem() + .AddRandomListItem(); + }); + } + }); + + var masterWebModel = SPMeta2Model.NewWebModel(web => + { + web.AddList(masterList, list => + { + list.AddListFieldLink(lookupField); + }); + }); + + result.LookupField = lookupField; + + result.ChildList = dataList; + result.ChildListNode = childListNode; + result.ChildListModel = childWebModel; + + + result.MasterList = masterList; + result.MasterListModel = masterWebModel; + + result.SiteModel = siteModel; + result.WebModel = webModel; + + if (action != null) + action(result); + + return result; + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] + public void CanDeploy_LookupField_AsEmptySingleSelect() + { + var field = GetSingleSelectLookupDefinition(def => + { + def.LookupListTitle = string.Empty; + def.LookupListUrl = string.Empty; + def.LookupList = string.Empty; + }); + + var siteModel = SPMeta2Model.NewSiteModel(site => + { + site.AddField(field); + }); + + TestModel(siteModel); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] + public void CanDeploy_LookupField_AsSingleSelect() + { + var field = GetSingleSelectLookupDefinition(); + + var siteModel = SPMeta2Model.NewSiteModel(site => + { + site.AddField(field); + }); + + TestModel(siteModel); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] + public void CanDeploy_LookupField_AsSingleSelectAndBindToListByTitle() + { + WithDisabledPropertyUpdateValidation(() => + { + var lookupEnvironment = GetLookupFieldEnvironment(env => + { + env.LookupField.LookupListTitle = env.ChildList.Title; + }); + TestModels(new ModelNode[]{ lookupEnvironment.ChildListModel, lookupEnvironment.SiteModel, lookupEnvironment.MasterListModel - }); - }); - - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] - public void CanDeploy_LookupField_AsSingleSelectAndBindToListById() - { - var lookupEnvironment = GetLookupFieldEnvironment(env => - { - env.ChildListNode.OnProvisioned(context => - { - env.LookupField.LookupList = ExtractListId(context).ToString(); - }); - }); - + }); + }); + + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] + public void CanDeploy_LookupField_AsSingleSelectAndBindToListById() + { + var lookupEnvironment = GetLookupFieldEnvironment(env => + { + env.ChildListNode.OnProvisioned(context => + { + env.LookupField.LookupList = ExtractListId(context).ToString(); + }); + }); + TestModels(new ModelNode[] { lookupEnvironment.ChildListModel, lookupEnvironment.SiteModel, lookupEnvironment.MasterListModel - }); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] - public void CanDeploy_LookupField_AsSingleSelectAndBindToSelf() - { - var lookupEnvironment = GetLookupFieldEnvironment(env => - { - env.LookupField.LookupList = "Self"; - }); - + }); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] + public void CanDeploy_LookupField_AsSingleSelectAndBindToSelf() + { + var lookupEnvironment = GetLookupFieldEnvironment(env => + { + env.LookupField.LookupList = "Self"; + }); + TestModels(new ModelNode[] { lookupEnvironment.ChildListModel, lookupEnvironment.SiteModel, lookupEnvironment.MasterListModel - }); - } - - //[TestMethod] - //[TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] - //public void CanDeploy_LookupField_AsSingleSelectAndBindToDocs() - //{ - // var lookupEnvironment = GetLookupFieldEnvironment(env => - // { - // env.LookupField.LookupList = "Docs"; - // }); - - // TestModels(new ModelNode[] - // { - // lookupEnvironment.ChildListModel, - // lookupEnvironment.SiteModel, - // lookupEnvironment.MasterListModel - // }); - //} - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] - public void CanDeploy_LookupField_AsSingleSelectAndBindToUserInfo() - { - var lookupEnvironment = GetLookupFieldEnvironment(env => - { - env.LookupField.LookupList = "UserInfo"; - }); - + }); + } + + //[TestMethod] + //[TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] + //public void CanDeploy_LookupField_AsSingleSelectAndBindToDocs() + //{ + // var lookupEnvironment = GetLookupFieldEnvironment(env => + // { + // env.LookupField.LookupList = "Docs"; + // }); + + // TestModels(new ModelNode[] + // { + // lookupEnvironment.ChildListModel, + // lookupEnvironment.SiteModel, + // lookupEnvironment.MasterListModel + // }); + //} + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] + public void CanDeploy_LookupField_AsSingleSelectAndBindToUserInfo() + { + var lookupEnvironment = GetLookupFieldEnvironment(env => + { + env.LookupField.LookupList = "UserInfo"; + }); + TestModels(new ModelNode[] { lookupEnvironment.ChildListModel, lookupEnvironment.SiteModel, lookupEnvironment.MasterListModel - }); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] - public void CanDeploy_LookupField_AsSingleSelectAndBindToListUrl() - { - var lookupEnvironment = GetLookupFieldEnvironment(env => - { -#pragma warning disable 618 - env.LookupField.LookupListUrl = env.ChildList.GetListUrl(); -#pragma warning restore 618 - }); - + }); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect")] + public void CanDeploy_LookupField_AsSingleSelectAndBindToListUrl() + { + var lookupEnvironment = GetLookupFieldEnvironment(env => + { +#pragma warning disable 618 + env.LookupField.LookupListUrl = env.ChildList.GetListUrl(); +#pragma warning restore 618 + }); + TestModels(new ModelNode[] { lookupEnvironment.ChildListModel, lookupEnvironment.SiteModel, lookupEnvironment.MasterListModel - }); - } - - private Guid ExtractListId(Models.OnCreatingContext context) - { - var obj = context.Object; - var objType = context.Object.GetType(); - - if (objType.ToString().Contains("Microsoft.SharePoint.Client.List")) - { - return (Guid)obj.GetPropertyValue("Id"); - } - else if (objType.ToString().Contains("Microsoft.SharePoint.SPList")) - { - return (Guid)obj.GetPropertyValue("ID"); - } - else - { - throw new SPMeta2NotImplementedException(string.Format("ID property extraction is not implemented for type: [{0}]", objType)); - } - } - - #endregion - - #region scopes - - - //[TestMethod] - //[TestCategory("Regression.Scenarios.Fields.LookupField.Scopes")] - //public void CanDeploy_LookupField_ToSite() - //{ - // WithDisabledPropertyUpdateValidation(() => - // { - // var lookupEnvironment = GetLookupFieldEnvironment(env => - // { - // env.LookupField.AllowMultipleValues = true; - // env.LookupField.LookupListTitle = env.ChildList.Title; - // }); - - // TestModels(new ModelNode[] - // { - // lookupEnvironment.ChildListModel, - // lookupEnvironment.SiteModel, - // lookupEnvironment.MasterListModel - // }); - // }); - //} - - - //[TestMethod] - //[TestCategory("Regression.Scenarios.Fields.LookupField.Scopes")] - //public void CanDeploy_LookupField_ToRootWeb() - //{ - // WithDisabledPropertyUpdateValidation(() => - // { - // var lookupEnvironment = GetLookupFieldEnvironment(env => - // { - // env.LookupField.AllowMultipleValues = true; - // env.LookupField.LookupListTitle = env.ChildList.Title; - // }); - - // TestModels(new ModelNode[] - // { - // lookupEnvironment.ChildListModel, - // lookupEnvironment.WebModel, - // lookupEnvironment.MasterListModel - // }); - // }); - //} - - - //[TestMethod] - //[TestCategory("Regression.Scenarios.Fields.LookupField.Scopes")] - //public void CanDeploy_LookupField_ToSubWeb() - //{ - // WithDisabledPropertyUpdateValidation(() => - // { - // var lookupEnvironment = GetLookupFieldEnvironment(env => - // { - // env.LookupField.AllowMultipleValues = true; - // env.LookupField.LookupListTitle = env.ChildList.Title; - // }); - - // TestModels(new ModelNode[] - // { - // lookupEnvironment.ChildListModel, - // lookupEnvironment.WebModel, - // lookupEnvironment.MasterListModel - // }); - // }); - //} - - #endregion - - #region multi seelct - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] - public void CanDeploy_LookupField_AsEmptyMultiSelectSelect() - { - var field = ModelGeneratorService.GetRandomDefinition(def => - { - def.AllowMultipleValues = true; - - def.LookupListTitle = string.Empty; - def.LookupListUrl = string.Empty; - def.LookupList = string.Empty; - }); - - var siteModel = SPMeta2Model.NewSiteModel(site => - { - site.AddField(field); - }); - - TestModel(siteModel); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] - public void CanDeploy_LookupField_AsMultiSelectSelect() - { - var field = ModelGeneratorService.GetRandomDefinition(def => - { - def.AllowMultipleValues = true; - }); - - var siteModel = SPMeta2Model.NewSiteModel(site => - { - site.AddField(field); - }); - - TestModel(siteModel); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] - public void CanDeploy_LookupField_AsMultiSelectAndBindToListByTitle() - { - WithDisabledPropertyUpdateValidation(() => - { - var lookupEnvironment = GetLookupFieldEnvironment(env => - { - env.LookupField.AllowMultipleValues = true; - env.LookupField.LookupListTitle = env.ChildList.Title; - }); - + }); + } + + private Guid ExtractListId(Models.OnCreatingContext context) + { + var obj = context.Object; + var objType = context.Object.GetType(); + + if (objType.ToString().Contains("Microsoft.SharePoint.Client.List")) + { + return (Guid)obj.GetPropertyValue("Id"); + } + else if (objType.ToString().Contains("Microsoft.SharePoint.SPList")) + { + return (Guid)obj.GetPropertyValue("ID"); + } + else + { + throw new SPMeta2NotImplementedException(string.Format("ID property extraction is not implemented for type: [{0}]", objType)); + } + } + + #endregion + + #region scopes + + + //[TestMethod] + //[TestCategory("Regression.Scenarios.Fields.LookupField.Scopes")] + //public void CanDeploy_LookupField_ToSite() + //{ + // WithDisabledPropertyUpdateValidation(() => + // { + // var lookupEnvironment = GetLookupFieldEnvironment(env => + // { + // env.LookupField.AllowMultipleValues = true; + // env.LookupField.LookupListTitle = env.ChildList.Title; + // }); + + // TestModels(new ModelNode[] + // { + // lookupEnvironment.ChildListModel, + // lookupEnvironment.SiteModel, + // lookupEnvironment.MasterListModel + // }); + // }); + //} + + + //[TestMethod] + //[TestCategory("Regression.Scenarios.Fields.LookupField.Scopes")] + //public void CanDeploy_LookupField_ToRootWeb() + //{ + // WithDisabledPropertyUpdateValidation(() => + // { + // var lookupEnvironment = GetLookupFieldEnvironment(env => + // { + // env.LookupField.AllowMultipleValues = true; + // env.LookupField.LookupListTitle = env.ChildList.Title; + // }); + + // TestModels(new ModelNode[] + // { + // lookupEnvironment.ChildListModel, + // lookupEnvironment.WebModel, + // lookupEnvironment.MasterListModel + // }); + // }); + //} + + + //[TestMethod] + //[TestCategory("Regression.Scenarios.Fields.LookupField.Scopes")] + //public void CanDeploy_LookupField_ToSubWeb() + //{ + // WithDisabledPropertyUpdateValidation(() => + // { + // var lookupEnvironment = GetLookupFieldEnvironment(env => + // { + // env.LookupField.AllowMultipleValues = true; + // env.LookupField.LookupListTitle = env.ChildList.Title; + // }); + + // TestModels(new ModelNode[] + // { + // lookupEnvironment.ChildListModel, + // lookupEnvironment.WebModel, + // lookupEnvironment.MasterListModel + // }); + // }); + //} + + #endregion + + #region count related + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.CountRelated")] + public void CanDeploy_LookupField_With_CountRelated() + { + var field1 = ModelGeneratorService.GetRandomDefinition(def => + { + def.CountRelated = Rnd.Bool(); + }); + + var field2 = ModelGeneratorService.GetRandomDefinition(def => + { + def.CountRelated = !field1.CountRelated; + }); + + var siteModel = SPMeta2Model.NewSiteModel(site => + { + site.AddField(field1); + site.AddField(field2); + }); + + TestModel(siteModel); + } + + #endregion + + #region multi seelct + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] + public void CanDeploy_LookupField_AsEmptyMultiSelectSelect() + { + var field = ModelGeneratorService.GetRandomDefinition(def => + { + def.AllowMultipleValues = true; + + def.LookupListTitle = string.Empty; + def.LookupListUrl = string.Empty; + def.LookupList = string.Empty; + }); + + var siteModel = SPMeta2Model.NewSiteModel(site => + { + site.AddField(field); + }); + + TestModel(siteModel); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] + public void CanDeploy_LookupField_AsMultiSelectSelect() + { + var field = ModelGeneratorService.GetRandomDefinition(def => + { + def.AllowMultipleValues = true; + }); + + var siteModel = SPMeta2Model.NewSiteModel(site => + { + site.AddField(field); + }); + + TestModel(siteModel); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] + public void CanDeploy_LookupField_AsMultiSelectAndBindToListByTitle() + { + WithDisabledPropertyUpdateValidation(() => + { + var lookupEnvironment = GetLookupFieldEnvironment(env => + { + env.LookupField.AllowMultipleValues = true; + env.LookupField.LookupListTitle = env.ChildList.Title; + }); + TestModels(new ModelNode[] { lookupEnvironment.ChildListModel, lookupEnvironment.SiteModel, lookupEnvironment.MasterListModel - }); - }); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] - public void CanDeploy_LookupField_AsMultiSelectAndBindToListById() - { - var lookupEnvironment = GetLookupFieldEnvironment(env => - { - env.ChildListNode.OnProvisioned(context => - { - env.LookupField.AllowMultipleValues = true; - env.LookupField.LookupList = ExtractListId(context).ToString(); - }); - }); - + }); + }); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] + public void CanDeploy_LookupField_AsMultiSelectAndBindToListById() + { + var lookupEnvironment = GetLookupFieldEnvironment(env => + { + env.ChildListNode.OnProvisioned(context => + { + env.LookupField.AllowMultipleValues = true; + env.LookupField.LookupList = ExtractListId(context).ToString(); + }); + }); + TestModels(new ModelNode[] { lookupEnvironment.ChildListModel, lookupEnvironment.SiteModel, lookupEnvironment.MasterListModel - }); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] - public void CanDeploy_LookupField_AsMultiSelectAndBindToSelf() - { - var lookupEnvironment = GetLookupFieldEnvironment(env => - { - env.LookupField.AllowMultipleValues = true; - env.LookupField.LookupList = "Self"; - }); - + }); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] + public void CanDeploy_LookupField_AsMultiSelectAndBindToSelf() + { + var lookupEnvironment = GetLookupFieldEnvironment(env => + { + env.LookupField.AllowMultipleValues = true; + env.LookupField.LookupList = "Self"; + }); + TestModels(new ModelNode[] { lookupEnvironment.ChildListModel, lookupEnvironment.SiteModel, lookupEnvironment.MasterListModel - }); - } - - //[TestMethod] - //[TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] - //public void CanDeploy_LookupField_AsMultiSelectAndBindToDocs() - //{ - // var lookupEnvironment = GetLookupFieldEnvironment(env => - // { - // env.LookupField.AllowMultipleValues = true; - // env.LookupField.LookupList = "Docs"; - // }); - - // TestModels(new ModelNode[] - // { - // lookupEnvironment.ChildListModel, - // lookupEnvironment.SiteModel, - // lookupEnvironment.MasterListModel - // }); - //} - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] - public void CanDeploy_LookupField_AsMultiSelectAndBindToUserInfo() - { - var lookupEnvironment = GetLookupFieldEnvironment(env => - { - env.LookupField.AllowMultipleValues = true; - env.LookupField.LookupList = "UserInfo"; - }); - + }); + } + + //[TestMethod] + //[TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] + //public void CanDeploy_LookupField_AsMultiSelectAndBindToDocs() + //{ + // var lookupEnvironment = GetLookupFieldEnvironment(env => + // { + // env.LookupField.AllowMultipleValues = true; + // env.LookupField.LookupList = "Docs"; + // }); + + // TestModels(new ModelNode[] + // { + // lookupEnvironment.ChildListModel, + // lookupEnvironment.SiteModel, + // lookupEnvironment.MasterListModel + // }); + //} + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] + public void CanDeploy_LookupField_AsMultiSelectAndBindToUserInfo() + { + var lookupEnvironment = GetLookupFieldEnvironment(env => + { + env.LookupField.AllowMultipleValues = true; + env.LookupField.LookupList = "UserInfo"; + }); + TestModels(new ModelNode[] { lookupEnvironment.ChildListModel, lookupEnvironment.SiteModel, lookupEnvironment.MasterListModel - }); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] - public void CanDeploy_LookupField_AsMultiSelectAndBindToListUrl() - { - var lookupEnvironment = GetLookupFieldEnvironment(env => - { - env.LookupField.AllowMultipleValues = true; -#pragma warning disable 618 - env.LookupField.LookupListUrl = env.ChildList.GetListUrl(); -#pragma warning restore 618 - }); - + }); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.MultiSelect")] + public void CanDeploy_LookupField_AsMultiSelectAndBindToListUrl() + { + var lookupEnvironment = GetLookupFieldEnvironment(env => + { + env.LookupField.AllowMultipleValues = true; +#pragma warning disable 618 + env.LookupField.LookupListUrl = env.ChildList.GetListUrl(); +#pragma warning restore 618 + }); + TestModels(new ModelNode[] { lookupEnvironment.ChildListModel, lookupEnvironment.SiteModel, lookupEnvironment.MasterListModel - }); - } - - #endregion - - #region post bindings - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.PostBinding")] - public void CanDeploy_LookupField_WithPostBinding_AsListTitle() - { - var lookupEnvironment = GetLookupFieldEnvironment(env => - { - env.LookupField.LookupList = string.Empty; - env.LookupField.LookupListTitle = string.Empty; - env.LookupField.LookupListUrl = string.Empty; - }); - + }); + } + + #endregion + + #region post bindings + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.PostBinding")] + public void CanDeploy_LookupField_WithPostBinding_AsListTitle() + { + var lookupEnvironment = GetLookupFieldEnvironment(env => + { + env.LookupField.LookupList = string.Empty; + env.LookupField.LookupListTitle = string.Empty; + env.LookupField.LookupListUrl = string.Empty; + }); + TestModels(new ModelNode[] { lookupEnvironment.SiteModel, lookupEnvironment.ChildListModel, lookupEnvironment.MasterListModel, - }); - - // binding - lookupEnvironment.LookupField.LookupListTitle = lookupEnvironment.ChildList.Title; - + }); + + // binding + lookupEnvironment.LookupField.LookupListTitle = lookupEnvironment.ChildList.Title; + TestModels(new ModelNode[] { lookupEnvironment.SiteModel, - }); - - // this would not pass validation as lookup should be already bound - WithExcpectedException(typeof(AssertFailedException), () => - { - lookupEnvironment.LookupField.LookupListTitle = lookupEnvironment.MasterList.Title; - + }); + + // this would not pass validation as lookup should be already bound + WithExcpectedException(typeof(AssertFailedException), () => + { + lookupEnvironment.LookupField.LookupListTitle = lookupEnvironment.MasterList.Title; + TestModels(new ModelNode[] { lookupEnvironment.SiteModel, - }); - }); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.PostBinding")] - public void CanDeploy_LookupField_WithPostBinding_AsListUrl() - { - var lookupEnvironment = GetLookupFieldEnvironment(env => - { - env.LookupField.LookupList = string.Empty; - env.LookupField.LookupListTitle = string.Empty; - env.LookupField.LookupListUrl = string.Empty; - }); - + }); + }); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.PostBinding")] + public void CanDeploy_LookupField_WithPostBinding_AsListUrl() + { + var lookupEnvironment = GetLookupFieldEnvironment(env => + { + env.LookupField.LookupList = string.Empty; + env.LookupField.LookupListTitle = string.Empty; + env.LookupField.LookupListUrl = string.Empty; + }); + TestModels(new ModelNode[] { lookupEnvironment.SiteModel, lookupEnvironment.ChildListModel, lookupEnvironment.MasterListModel, - }); - - // binding -#pragma warning disable 618 - lookupEnvironment.LookupField.LookupListUrl = lookupEnvironment.ChildList.GetListUrl(); -#pragma warning restore 618 - + }); + + // binding +#pragma warning disable 618 + lookupEnvironment.LookupField.LookupListUrl = lookupEnvironment.ChildList.GetListUrl(); +#pragma warning restore 618 + TestModels(new ModelNode[] { lookupEnvironment.SiteModel, - }); - - // this would not pass validation as lookup should be already bound - WithExcpectedException(typeof(AssertFailedException), () => - { - lookupEnvironment.LookupField.LookupListTitle = lookupEnvironment.MasterList.Title; - + }); + + // this would not pass validation as lookup should be already bound + WithExcpectedException(typeof(AssertFailedException), () => + { + lookupEnvironment.LookupField.LookupListTitle = lookupEnvironment.MasterList.Title; + TestModels(new ModelNode[] { lookupEnvironment.SiteModel, - }); - }); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.PostBinding")] - public void CanDeploy_LookupField_WithPostBinding_AsListId() - { - var lookupEnvironment = GetLookupFieldEnvironment(env => - { - env.LookupField.LookupList = string.Empty; - env.LookupField.LookupListTitle = string.Empty; - env.LookupField.LookupListUrl = string.Empty; - }); - - lookupEnvironment.ChildListNode.OnProvisioned(context => - { - lookupEnvironment.LookupField.LookupList = ExtractListId(context).ToString(); - }); - + }); + }); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.PostBinding")] + public void CanDeploy_LookupField_WithPostBinding_AsListId() + { + var lookupEnvironment = GetLookupFieldEnvironment(env => + { + env.LookupField.LookupList = string.Empty; + env.LookupField.LookupListTitle = string.Empty; + env.LookupField.LookupListUrl = string.Empty; + }); + + lookupEnvironment.ChildListNode.OnProvisioned(context => + { + lookupEnvironment.LookupField.LookupList = ExtractListId(context).ToString(); + }); + TestModels(new ModelNode[] { lookupEnvironment.SiteModel, lookupEnvironment.MasterListModel, lookupEnvironment.ChildListModel, - }); - + }); + TestModels(new ModelNode[] { lookupEnvironment.SiteModel, - }); - - // this would not pass validation as lookup should be already bound - WithExcpectedException(typeof(AssertFailedException), () => - { - lookupEnvironment.LookupField.LookupListTitle = lookupEnvironment.MasterList.Title; - + }); + + // this would not pass validation as lookup should be already bound + WithExcpectedException(typeof(AssertFailedException), () => + { + lookupEnvironment.LookupField.LookupListTitle = lookupEnvironment.MasterList.Title; + TestModels(new ModelNode[] { lookupEnvironment.SiteModel, - }); - }); - } - - - - #endregion - - #region custom sub web - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect.WebUrl")] - public void CanDeploy_LookupField_AsSingleSelectAndBindToListById_OnSubWeb() - { - var subWeb = ModelGeneratorService.GetRandomDefinition(def => - { - - }); - - var lookupEnvironment = GetLookupFieldEnvironment(env => - { - env.ChildListNode.OnProvisioned(context => - { - env.LookupField.LookupList = ExtractListId(context).ToString(); - env.LookupField.LookupWebUrl = UrlUtility.CombineUrl("~sitecollection", subWeb.Url); - }); - }, subWeb); - + }); + }); + } + + + + #endregion + + #region custom sub web + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect.WebUrl")] + public void CanDeploy_LookupField_AsSingleSelectAndBindToListById_OnSubWeb() + { + var subWeb = ModelGeneratorService.GetRandomDefinition(def => + { + + }); + + var lookupEnvironment = GetLookupFieldEnvironment(env => + { + env.ChildListNode.OnProvisioned(context => + { + env.LookupField.LookupList = ExtractListId(context).ToString(); + env.LookupField.LookupWebUrl = UrlUtility.CombineUrl("~sitecollection", subWeb.Url); + }); + }, subWeb); + TestModels(new ModelNode[] { lookupEnvironment.ChildListModel, lookupEnvironment.SiteModel, lookupEnvironment.MasterListModel - }); - } - - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect.WebUrl")] - public void CanDeploy_LookupField_AsSingleSelectAndBindToListByTitle_OnSubWeb() - { - WithDisabledPropertyUpdateValidation(() => - { - var subWeb = ModelGeneratorService.GetRandomDefinition(def => - { - - }); - - var lookupEnvironment = GetLookupFieldEnvironment(env => - { - env.LookupField.LookupListTitle = env.ChildList.Title; - env.LookupField.LookupWebUrl = UrlUtility.CombineUrl("~sitecollection", subWeb.Url); - - }, subWeb); - + }); + } + + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect.WebUrl")] + public void CanDeploy_LookupField_AsSingleSelectAndBindToListByTitle_OnSubWeb() + { + WithDisabledPropertyUpdateValidation(() => + { + var subWeb = ModelGeneratorService.GetRandomDefinition(def => + { + + }); + + var lookupEnvironment = GetLookupFieldEnvironment(env => + { + env.LookupField.LookupListTitle = env.ChildList.Title; + env.LookupField.LookupWebUrl = UrlUtility.CombineUrl("~sitecollection", subWeb.Url); + + }, subWeb); + TestModels(new ModelNode[]{ lookupEnvironment.ChildListModel, lookupEnvironment.SiteModel, lookupEnvironment.MasterListModel - }); - }); - - } - - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect.WebUrl")] - public void CanDeploy_LookupField_AsSingleSelectAndBindToListUrl_OnSubWeb() - { - var subWeb = ModelGeneratorService.GetRandomDefinition(def => - { - - }); - - var lookupEnvironment = GetLookupFieldEnvironment(env => - { -#pragma warning disable 618 - env.LookupField.LookupListUrl = env.ChildList.GetListUrl(); -#pragma warning restore 618 - env.LookupField.LookupWebUrl = UrlUtility.CombineUrl("~sitecollection", subWeb.Url); - - }, subWeb); - + }); + }); + + } + + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect.WebUrl")] + public void CanDeploy_LookupField_AsSingleSelectAndBindToListUrl_OnSubWeb() + { + var subWeb = ModelGeneratorService.GetRandomDefinition(def => + { + + }); + + var lookupEnvironment = GetLookupFieldEnvironment(env => + { +#pragma warning disable 618 + env.LookupField.LookupListUrl = env.ChildList.GetListUrl(); +#pragma warning restore 618 + env.LookupField.LookupWebUrl = UrlUtility.CombineUrl("~sitecollection", subWeb.Url); + + }, subWeb); + TestModels(new ModelNode[] { lookupEnvironment.ChildListModel, lookupEnvironment.SiteModel, lookupEnvironment.MasterListModel - }); - } - - #endregion - - #region custom cases - - [TestMethod] - [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect.WebUrl")] - public void CanDeploy_LookupField_As_SiteMaster_And_SubWebChild() - { - // https://github.com/SubPointSolutions/spmeta2/issues/694 - - // 1 - Installing a generic list (Departments) on Top-Level-Site-Collection and add some data (Just using Title-Field). - var masterDepartmentsList = ModelGeneratorService.GetRandomDefinition(def => - { - def.TemplateType = BuiltInListTemplateTypeId.GenericList; - -#pragma warning disable 618 - def.Url = string.Empty; -#pragma warning restore 618 - def.CustomUrl = string.Format("Lists/{0}", Rnd.String()); - }); - - var masterDepartmentsRootWebModel = SPMeta2Model.NewWebModel(web => - { - web.AddList(masterDepartmentsList, list => - { - list.AddRandomListItem(); - list.AddRandomListItem(); - list.AddRandomListItem(); - }); - }); - - // 2 - Creating a Site-Column (Department) of type Lookup, Data Comes from previous mentioned List. - var departmentsFieldLookup = ModelGeneratorService.GetRandomDefinition(def => - { - def.LookupListTitle = masterDepartmentsList.Title; - def.LookupWebUrl = "~sitecollection"; - }); - - // 3 - Creating a Site-Content-Type on Top-Level-Site-Collection of type Document (Contract) and add the Site-Column-Lookup-field Department. - var contractDocumentContentType = ModelGeneratorService.GetRandomDefinition(def => - { - def.ParentContentTypeId = BuiltInContentTypeId.Document; - }); - - // the site model for 2-3 containing field and content type (IA -> information architecture :) - var masterIASiteModel = SPMeta2Model.NewSiteModel(site => - { - site.AddField(departmentsFieldLookup); - - site.AddContentType(contractDocumentContentType, contentType => - { - contentType.AddContentTypeFieldLink(departmentsFieldLookup); - }); - }); - - // 4 - Now on a Sub-Site of the Top-Level-Site-Collection - // create a Document-Library (Contracts) and add the previous mentioned Site-Content-Type. - - var subWeb = ModelGeneratorService.GetRandomDefinition(def => - { - - }); - - var contractsDocumentLibrary = ModelGeneratorService.GetRandomDefinition(def => - { - def.ContentTypesEnabled = true; - def.TemplateType = BuiltInListTemplateTypeId.DocumentLibrary; - -#pragma warning disable 618 - def.Url = string.Empty; -#pragma warning restore 618 - def.CustomUrl = string.Format("{0}", Rnd.String()); - - // just don't want to go site content -> find a list.. - def.OnQuickLaunch = true; - }); - - var contractsSubWebModel = SPMeta2Model.NewWebModel(rootWeb => - { - rootWeb.AddWeb(subWeb, web => - { - web.AddList(contractsDocumentLibrary, list => - { - list.AddContentTypeLink(contractDocumentContentType); - - // making the content type defullt - list.AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition - { + }); + } + + #endregion + + #region custom cases + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect.WebUrl")] + public void CanDeploy_LookupField_As_SiteMaster_And_SubWebChild() + { + // https://github.com/SubPointSolutions/spmeta2/issues/694 + + // 1 - Installing a generic list (Departments) on Top-Level-Site-Collection and add some data (Just using Title-Field). + var masterDepartmentsList = ModelGeneratorService.GetRandomDefinition(def => + { + def.TemplateType = BuiltInListTemplateTypeId.GenericList; + +#pragma warning disable 618 + def.Url = string.Empty; +#pragma warning restore 618 + def.CustomUrl = string.Format("Lists/{0}", Rnd.String()); + }); + + var masterDepartmentsRootWebModel = SPMeta2Model.NewWebModel(web => + { + web.AddList(masterDepartmentsList, list => + { + list.AddRandomListItem(); + list.AddRandomListItem(); + list.AddRandomListItem(); + }); + }); + + // 2 - Creating a Site-Column (Department) of type Lookup, Data Comes from previous mentioned List. + var departmentsFieldLookup = ModelGeneratorService.GetRandomDefinition(def => + { + def.LookupListTitle = masterDepartmentsList.Title; + def.LookupWebUrl = "~sitecollection"; + }); + + // 3 - Creating a Site-Content-Type on Top-Level-Site-Collection of type Document (Contract) and add the Site-Column-Lookup-field Department. + var contractDocumentContentType = ModelGeneratorService.GetRandomDefinition(def => + { + def.ParentContentTypeId = BuiltInContentTypeId.Document; + }); + + // the site model for 2-3 containing field and content type (IA -> information architecture :) + var masterIASiteModel = SPMeta2Model.NewSiteModel(site => + { + site.AddField(departmentsFieldLookup); + + site.AddContentType(contractDocumentContentType, contentType => + { + contentType.AddContentTypeFieldLink(departmentsFieldLookup); + }); + }); + + // 4 - Now on a Sub-Site of the Top-Level-Site-Collection + // create a Document-Library (Contracts) and add the previous mentioned Site-Content-Type. + + var subWeb = ModelGeneratorService.GetRandomDefinition(def => + { + + }); + + var contractsDocumentLibrary = ModelGeneratorService.GetRandomDefinition(def => + { + def.ContentTypesEnabled = true; + def.TemplateType = BuiltInListTemplateTypeId.DocumentLibrary; + +#pragma warning disable 618 + def.Url = string.Empty; +#pragma warning restore 618 + def.CustomUrl = string.Format("{0}", Rnd.String()); + + // just don't want to go site content -> find a list.. + def.OnQuickLaunch = true; + }); + + var contractsSubWebModel = SPMeta2Model.NewWebModel(rootWeb => + { + rootWeb.AddWeb(subWeb, web => + { + web.AddList(contractsDocumentLibrary, list => + { + list.AddContentTypeLink(contractDocumentContentType); + + // making the content type defullt + list.AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition + { ContentTypes = new List { new ContentTypeLinkValue { ContentTypeName = contractDocumentContentType.Name} - } - }); - }); - }); - }); - - // deployment - // 1 - deploy root list - TestModel(masterDepartmentsRootWebModel); - - // 2 - deploy lookup list pointing a site level (root web) list and content type - TestModel(masterIASiteModel); - - // 3 - deploy the sunu web, list, attach content type to a list and make it nice - TestModel(contractsSubWebModel); - } - - #endregion - } -} + } + }); + }); + }); + }); + + // deployment + // 1 - deploy root list + TestModel(masterDepartmentsRootWebModel); + + // 2 - deploy lookup list pointing a site level (root web) list and content type + TestModel(masterIASiteModel); + + // 3 - deploy the sunu web, list, attach content type to a list and make it nice + TestModel(contractsSubWebModel); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Fields.LookupField.SingleSelect.WebUrl")] + public void CanDeploy_LookupField_As_SubWebMaster_And_SubWebChild() + { + // https://github.com/SubPointSolutions/spmeta2/issues/694 + + // 1 - Installing a generic list (Departments) on subweb and add some data (Just using Title-Field). + var masterDepartmentsList = ModelGeneratorService.GetRandomDefinition(def => + { + def.TemplateType = BuiltInListTemplateTypeId.GenericList; + +#pragma warning disable 618 + def.Url = string.Empty; +#pragma warning restore 618 + def.CustomUrl = string.Format("Lists/{0}", Rnd.String()); + }); + + // on a Sub-Site of the Top-Level-Site-Collection + // create a Document-Library (Contracts) and add the previous mentioned Site-Content-Type. + var subWeb = ModelGeneratorService.GetRandomDefinition(def => + { + + }); + + var masterDepartmentsSubWebModel = SPMeta2Model.NewWebModel(rootWeb => + { + rootWeb.AddWeb(subWeb, web => + { + web.AddList(masterDepartmentsList, list => + { + list.AddRandomListItem(); + list.AddRandomListItem(); + list.AddRandomListItem(); + }); + }); + }); + + // 2 - Creating a web-column (Department) of type Lookup, Data Comes from previous mentioned List. + // ~site token must refer to the sub web and the field is web-scoped + var departmentsFieldLookup = ModelGeneratorService.GetRandomDefinition(def => + { + def.LookupListTitle = masterDepartmentsList.Title; + def.LookupWebUrl = "~site"; + }); + + // 3 - Creating a Site-Content-Type on Top-Level-Site-Collection of type Document (Contract) and add the Site-Column-Lookup-field Department. + var contractDocumentContentType = ModelGeneratorService.GetRandomDefinition(def => + { + def.ParentContentTypeId = BuiltInContentTypeId.Document; + }); + + // the sub web model for 2-3 containing field and content type (IA -> information architecture :) + var masterIASubWebModel = SPMeta2Model.NewWebModel(rootWeb => + { + rootWeb.AddWeb(subWeb, web => + { + web.AddField(departmentsFieldLookup); + + web.AddContentType(contractDocumentContentType, contentType => + { + contentType.AddContentTypeFieldLink(departmentsFieldLookup); + }); + }); + }); + + var contractsDocumentLibrary = ModelGeneratorService.GetRandomDefinition(def => + { + def.ContentTypesEnabled = true; + def.TemplateType = BuiltInListTemplateTypeId.DocumentLibrary; + +#pragma warning disable 618 + def.Url = string.Empty; +#pragma warning restore 618 + def.CustomUrl = string.Format("{0}", Rnd.String()); + + // just don't want to go site content -> find a list.. + def.OnQuickLaunch = true; + }); + + var contractsSubWebModel = SPMeta2Model.NewWebModel(rootWeb => + { + rootWeb.AddWeb(subWeb, web => + { + web.AddList(contractsDocumentLibrary, list => + { + list.AddContentTypeLink(contractDocumentContentType); + + // making the content type defullt + list.AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition + { + ContentTypes = new List + { + new ContentTypeLinkValue { ContentTypeName = contractDocumentContentType.Name} + } + }); + }); + }); + }); + + // deployment + // 1 - deploy root list + TestModel(masterDepartmentsSubWebModel); + + // 2 - deploy lookup list pointing a site level (root web) list and content type + TestModel(masterIASubWebModel); + + // 3 - deploy the sunu web, list, attach content type to a list and make it nice + TestModel(contractsSubWebModel); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ListScenariosTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ListScenariosTest.cs index 5937f3582..acd060db4 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ListScenariosTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ListScenariosTest.cs @@ -136,8 +136,8 @@ private ContentTypeEnvironment GetContentTypeLinksSandbox( #region removing content types [TestMethod] - [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks")] - public void CanDeploy_CanRemoveContentTypeLinksInLibrary() + [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks.Remove")] + public void CanDeploy_CanRemoveContentTypeLinksInLibrary_ByName() { var env = GetContentTypeLinksSandbox( (siteModel, e) => @@ -187,8 +187,59 @@ public void CanDeploy_CanRemoveContentTypeLinksInLibrary() } [TestMethod] - [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks")] - public void CanDeploy_CanRemoveContentTypeLinksInList() + [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks.Remove")] + public void CanDeploy_CanRemoveContentTypeLinksInLibrary_ById() + { + var env = GetContentTypeLinksSandbox( + (siteModel, e) => + { + e.First.ParentContentTypeId = BuiltInContentTypeId.Document; + e.Second.ParentContentTypeId = BuiltInContentTypeId.Document; + e.Third.ParentContentTypeId = BuiltInContentTypeId.Document; + }, + (webModel, e) => + { + + }, + (listModel, e) => + { + e.List.TemplateType = BuiltInListTemplateTypeId.DocumentLibrary; + e.List.ContentTypesEnabled = true; + + listModel + .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition + { + ContentTypes = new List + { + new ContentTypeLinkValue { ContentTypeId = e.Second.GetContentTypeId() }, + new ContentTypeLinkValue { ContentTypeId = e.First.GetContentTypeId() }, + } + }, m => + { + m.OnProvisioned(ctx => + { + // disable validation on content type links as they would be deleted by 'RemoveContentTypeLinksDefinition' + + //e.FirstLink.Options.RequireSelfProcessing = e.FirstLink.Value.RequireSelfProcessing = false; + //e.SecondLink.Options.RequireSelfProcessing = e.SecondLink.Value.RequireSelfProcessing = false; + //e.ThirdLink.Options.RequireSelfProcessing = e.ThirdLink.Value.RequireSelfProcessing = false; + + e.FirstLink.Options.RequireSelfProcessing = false; + e.SecondLink.Options.RequireSelfProcessing = false; + e.ThirdLink.Options.RequireSelfProcessing = false; + }); + }); + }); + + TestModel(env.SiteModel); + + // we need to skip ct links validation + TestModel(env.WebModel); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks.Remove")] + public void CanDeploy_CanRemoveContentTypeLinksInList_ByName() { var env = GetContentTypeLinksSandbox( (siteModel, e) => @@ -235,13 +286,62 @@ public void CanDeploy_CanRemoveContentTypeLinksInList() TestModel(env.WebModel); } + [TestMethod] + [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks.Remove")] + public void CanDeploy_CanRemoveContentTypeLinksInList_ById() + { + var env = GetContentTypeLinksSandbox( + (siteModel, e) => + { + e.First.ParentContentTypeId = BuiltInContentTypeId.Item; + e.Second.ParentContentTypeId = BuiltInContentTypeId.Item; + e.Third.ParentContentTypeId = BuiltInContentTypeId.Item; + }, + (webModel, e) => + { + + }, + (listModel, e) => + { + e.List.TemplateType = BuiltInListTemplateTypeId.GenericList; + e.List.ContentTypesEnabled = true; + + listModel + .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition + { + ContentTypes = new List + { + new ContentTypeLinkValue { ContentTypeId = e.Second.GetContentTypeId() }, + new ContentTypeLinkValue { ContentTypeId = e.First.GetContentTypeId() }, + } + }, m => + { + m.OnProvisioned(ctx => + { + // disable validation on content type links as they would be deleted by 'RemoveContentTypeLinksDefinition' + + //e.FirstLink.Options.RequireSelfProcessing = e.FirstLink.Value.RequireSelfProcessing = false; + //e.SecondLink.Options.RequireSelfProcessing = e.SecondLink.Value.RequireSelfProcessing = false; + //e.ThirdLink.Options.RequireSelfProcessing = e.ThirdLink.Value.RequireSelfProcessing = false; + + e.FirstLink.Options.RequireSelfProcessing = false; + e.SecondLink.Options.RequireSelfProcessing = false; + e.ThirdLink.Options.RequireSelfProcessing = false; + }); + }); + }); + + TestModel(env.SiteModel); + TestModel(env.WebModel); + } + #endregion #region hiding content types [TestMethod] - [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks")] - public void CanDeploy_CanHideContentTypeLinksInLibrary() + [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks.Hide")] + public void CanDeploy_CanHideContentTypeLinksInLibrary_ByName() { var env = GetContentTypeLinksSandbox( (siteModel, e) => @@ -274,10 +374,45 @@ public void CanDeploy_CanHideContentTypeLinksInLibrary() TestModel(env.WebModel); } + [TestMethod] + [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks.Hide")] + public void CanDeploy_CanHideContentTypeLinksInLibrary_ById() + { + var env = GetContentTypeLinksSandbox( + (siteModel, e) => + { + e.First.ParentContentTypeId = BuiltInContentTypeId.Document; + e.Second.ParentContentTypeId = BuiltInContentTypeId.Document; + e.Third.ParentContentTypeId = BuiltInContentTypeId.Document; + }, + (webModel, e) => + { + + }, + (listModel, e) => + { + e.List.TemplateType = BuiltInListTemplateTypeId.DocumentLibrary; + e.List.ContentTypesEnabled = true; + + listModel + .AddHideContentTypeLinks(new HideContentTypeLinksDefinition + { + ContentTypes = new List + { + new ContentTypeLinkValue { ContentTypeId = e.Second.GetContentTypeId() }, + new ContentTypeLinkValue { ContentTypeId = e.First.GetContentTypeId() }, + } + }); + }); + + TestModel(env.SiteModel); + TestModel(env.WebModel); + } + [TestMethod] - [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks")] - public void CanDeploy_CanHideContentTypeLinksInList() + [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks.Hide")] + public void CanDeploy_CanHideContentTypeLinksInList_ByName() { var env = GetContentTypeLinksSandbox( (siteModel, e) => @@ -310,14 +445,125 @@ public void CanDeploy_CanHideContentTypeLinksInList() TestModel(env.WebModel); } + [TestMethod] + [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks.Hide")] + public void CanDeploy_CanHideContentTypeLinksInList_ById() + { + var env = GetContentTypeLinksSandbox( + (siteModel, e) => + { + e.First.ParentContentTypeId = BuiltInContentTypeId.Item; + e.Second.ParentContentTypeId = BuiltInContentTypeId.Item; + e.Third.ParentContentTypeId = BuiltInContentTypeId.Item; + }, + (webModel, e) => + { + + }, + (listModel, e) => + { + e.List.TemplateType = BuiltInListTemplateTypeId.GenericList; + e.List.ContentTypesEnabled = true; + + listModel + .AddHideContentTypeLinks(new HideContentTypeLinksDefinition + { + ContentTypes = new List + { + new ContentTypeLinkValue { ContentTypeId = e.Second.GetContentTypeId() }, + new ContentTypeLinkValue { ContentTypeId = e.First.GetContentTypeId() }, + } + }); + }); + + TestModel(env.SiteModel); + TestModel(env.WebModel); + } + + #endregion + + #region adding content types + + [TestMethod] + [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks.Add")] + public void CanDeploy_CanAddContentTypeLinksInList_ByName() + { + ContentTypeDefinition ctFirst = null; + ContentTypeDefinition ctSecond = null; + + var siteModel = SPMeta2Model.NewSiteModel(site => + { + site + .AddRandomContentType(ct => { ctFirst = ct.Value as ContentTypeDefinition; }) + .AddRandomContentType(ct => { ctSecond = ct.Value as ContentTypeDefinition; }); + }); + + var webModel = SPMeta2Model.NewWebModel(web => + { + web.AddRandomList(list => + { + (list.Value as ListDefinition).ContentTypesEnabled = true; + + list + .AddContentTypeLink(new ContentTypeLinkDefinition + { + ContentTypeName = ctFirst.Name + }) + .AddContentTypeLink(new ContentTypeLinkDefinition + { + ContentTypeName = ctSecond.Name + }); + }); + }); + + TestModel(siteModel); + TestModel(webModel); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks.Add")] + public void CanDeploy_CanAddContentTypeLinksInList_ById() + { + ContentTypeDefinition ctFirst = null; + ContentTypeDefinition ctSecond = null; + + var siteModel = SPMeta2Model.NewSiteModel(site => + { + site + .AddRandomContentType(ct => { ctFirst = ct.Value as ContentTypeDefinition; }) + .AddRandomContentType(ct => { ctSecond = ct.Value as ContentTypeDefinition; }); + }); + + var webModel = SPMeta2Model.NewWebModel(web => + { + web.AddRandomList(list => + { + (list.Value as ListDefinition).ContentTypesEnabled = true; + + list + .AddContentTypeLink(new ContentTypeLinkDefinition + { + ContentTypeId = ctFirst.GetContentTypeId() + }) + .AddContentTypeLink(new ContentTypeLinkDefinition + { + ContentTypeId = ctSecond.GetContentTypeId() + }); + }); + }); + + TestModel(siteModel); + TestModel(webModel); + } + #endregion #region content type order [TestMethod] - [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks")] - public void CanDeploy_CanSetupUniqueContentTypeOrderForLibrary() + [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks.UniqueOrder")] + public void CanDeploy_CanSetupUniqueContentTypeOrderForLibrary_ByName() { var env = GetContentTypeLinksSandbox( (siteModel, e) => @@ -352,8 +598,44 @@ public void CanDeploy_CanSetupUniqueContentTypeOrderForLibrary() } [TestMethod] - [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks")] - public void CanDeploy_CanSetupUniqueContentTypeOrderForList() + [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks.UniqueOrder")] + public void CanDeploy_CanSetupUniqueContentTypeOrderForLibrary_ById() + { + var env = GetContentTypeLinksSandbox( + (siteModel, e) => + { + e.First.ParentContentTypeId = BuiltInContentTypeId.Document; + e.Second.ParentContentTypeId = BuiltInContentTypeId.Document; + e.Third.ParentContentTypeId = BuiltInContentTypeId.Document; + }, + (webModel, e) => + { + + }, + (listModel, e) => + { + e.List.TemplateType = BuiltInListTemplateTypeId.DocumentLibrary; + e.List.ContentTypesEnabled = true; + + listModel + .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition + { + ContentTypes = new List + { + new ContentTypeLinkValue { ContentTypeId = e.Second.GetContentTypeId() }, + new ContentTypeLinkValue { ContentTypeId = e.Third.GetContentTypeId() }, + new ContentTypeLinkValue { ContentTypeId = e.First.GetContentTypeId() }, + } + }); + }); + + TestModel(env.SiteModel); + TestModel(env.WebModel); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks.UniqueOrder")] + public void CanDeploy_CanSetupUniqueContentTypeOrderForList_ByName() { var env = GetContentTypeLinksSandbox( (siteModel, e) => @@ -388,6 +670,43 @@ public void CanDeploy_CanSetupUniqueContentTypeOrderForList() } + [TestMethod] + [TestCategory("Regression.Scenarios.Lists.ContentTypeLinks.UniqueOrder")] + public void CanDeploy_CanSetupUniqueContentTypeOrderForList_ById() + { + var env = GetContentTypeLinksSandbox( + (siteModel, e) => + { + e.First.ParentContentTypeId = BuiltInContentTypeId.Item; + e.Second.ParentContentTypeId = BuiltInContentTypeId.Item; + e.Third.ParentContentTypeId = BuiltInContentTypeId.Item; + }, + (webModel, e) => + { + + }, + (listModel, e) => + { + e.List.TemplateType = BuiltInListTemplateTypeId.GenericList; + e.List.ContentTypesEnabled = true; + + listModel + .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition + { + ContentTypes = new List + { + new ContentTypeLinkValue { ContentTypeId = e.Second.GetContentTypeId() }, + new ContentTypeLinkValue { ContentTypeId = e.Third.GetContentTypeId() }, + new ContentTypeLinkValue { ContentTypeId = e.First.GetContentTypeId() }, + } + }); + }); + + TestModel(env.SiteModel); + TestModel(env.WebModel); + } + + #endregion #region lists @@ -730,7 +1049,7 @@ public void CanDeploy_DocumentLibrary_With_WebCollectionToken_DocumentTemplateUr { //def.EnableVersioning = true; //def.EnableMinorVersions = true; - + //def.EnableModeration = true; def.TemplateType = BuiltInListTemplateTypeId.DocumentLibrary; diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ListViewWebPartScenariosTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ListViewWebPartScenariosTest.cs index 850377f44..389d413ea 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ListViewWebPartScenariosTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ListViewWebPartScenariosTest.cs @@ -1,280 +1,280 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; - -using Microsoft.VisualStudio.TestTools.UnitTesting; -using SPMeta2.BuiltInDefinitions; -using SPMeta2.Containers; -using SPMeta2.Containers.Extensions; -using SPMeta2.Containers.Standard; - -using SPMeta2.Definitions; -using SPMeta2.Definitions.Webparts; -using SPMeta2.Enumerations; -using SPMeta2.Regression.Definitions.Extended; -using SPMeta2.Regression.Tests.Base; -using SPMeta2.Standard.Definitions; -using SPMeta2.Standard.Enumerations; -using SPMeta2.Syntax.Default; -using SPMeta2.Syntax.Default.Modern; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using SPMeta2.BuiltInDefinitions; +using SPMeta2.Containers; +using SPMeta2.Containers.Extensions; +using SPMeta2.Containers.Standard; + +using SPMeta2.Definitions; +using SPMeta2.Definitions.Webparts; +using SPMeta2.Enumerations; +using SPMeta2.Regression.Definitions.Extended; +using SPMeta2.Regression.Tests.Base; +using SPMeta2.Standard.Definitions; +using SPMeta2.Standard.Enumerations; +using SPMeta2.Syntax.Default; +using SPMeta2.Syntax.Default.Modern; using SPMeta2.Definitions.Base; -using SPMeta2.Regression.Tests.Extensions; - -namespace SPMeta2.Regression.Tests.Impl.Scenarios -{ - [TestClass] - public class ListViewWebPartScenariosTest : ListViewWebPartScenariosTestBase - { - #region internal - - [ClassInitialize] - public static void Init(TestContext context) - { - InternalInit(); - } - - [ClassCleanup] - public static void Cleanup() - { - InternalCleanup(); - } - - #endregion - - #region list binding tests - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart")] - public void CanDeploy_ListViewWebPart_ByListTitle() - { - var sourceList = ModelGeneratorService.GetRandomDefinition(def => { }); - var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => - { - def.ListId = Guid.Empty; - def.ListTitle = BuiltInDefinitions.BuiltInListDefinitions.StyleLibrary.Title; - def.ListUrl = string.Empty; - - def.ViewName = string.Empty; - def.ViewId = null; - }); - - - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddList(sourceList) - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list - .AddRandomWebPartPage(page => - { - page.AddListViewWebPart(listViewWebpart); - }); - }); - - }); - - TestModel(model); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart")] - public void CanDeploy_ListViewWebPart_ByListUrl() - { - var sourceList = ModelGeneratorService.GetRandomDefinition(def => { }); - var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => - { - def.ListId = Guid.Empty; - def.ListTitle = string.Empty; -#pragma warning disable 618 - def.ListUrl = BuiltInListDefinitions.StyleLibrary.GetListUrl(); -#pragma warning restore 618 - - def.ViewName = string.Empty; - def.ViewId = null; - }); - - - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddList(sourceList) - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list - .AddRandomWebPartPage(page => - { - page.AddListViewWebPart(listViewWebpart); - }); - }); - - }); - - TestModel(model); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart")] - public void CanDeploy_ListViewWebPart_ByListId() - { - WithDisabledDefinitionImmutabilityValidation(() => - { - var sourceList = ModelGeneratorService.GetRandomDefinition(def => { }); - var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => - { - def.ListId = Guid.Empty; - def.ListTitle = string.Empty; - def.ListUrl = string.Empty; - - def.ViewName = string.Empty; - def.ViewId = null; - }); - - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddList(sourceList, list => - { - list.OnProvisioned(context => - { - listViewWebpart.ListId = ExtractListId(context); - }); - }) - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list - .AddRandomWebPartPage(page => - { - page.AddListViewWebPart(listViewWebpart); - }); - }); - - }); - - TestModel(model); - }); - } - - #endregion - - #region list view binding tests - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart")] - public void CanDeploy_ListViewWebPart_ByViewId() - { - WithDisabledDefinitionImmutabilityValidation(() => - { - - var sourceList = ModelGeneratorService.GetRandomDefinition(def => { }); - var sourceView = ModelGeneratorService.GetRandomDefinition(def => - { +using SPMeta2.Regression.Tests.Extensions; + +namespace SPMeta2.Regression.Tests.Impl.Scenarios +{ + [TestClass] + public class ListViewWebPartScenariosTest : ListViewWebPartScenariosTestBase + { + #region internal + + [ClassInitialize] + public static void Init(TestContext context) + { + InternalInit(); + } + + [ClassCleanup] + public static void Cleanup() + { + InternalCleanup(); + } + + #endregion + + #region list binding tests + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart")] + public void CanDeploy_ListViewWebPart_ByListTitle() + { + var sourceList = ModelGeneratorService.GetRandomDefinition(def => { }); + var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => + { + def.ListId = Guid.Empty; + def.ListTitle = BuiltInDefinitions.BuiltInListDefinitions.StyleLibrary.Title; + def.ListUrl = string.Empty; + + def.ViewName = string.Empty; + def.ViewId = null; + }); + + + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddList(sourceList) + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddRandomWebPartPage(page => + { + page.AddListViewWebPart(listViewWebpart); + }); + }); + + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart")] + public void CanDeploy_ListViewWebPart_ByListUrl() + { + var sourceList = ModelGeneratorService.GetRandomDefinition(def => { }); + var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => + { + def.ListId = Guid.Empty; + def.ListTitle = string.Empty; +#pragma warning disable 618 + def.ListUrl = BuiltInListDefinitions.StyleLibrary.GetListUrl(); +#pragma warning restore 618 + + def.ViewName = string.Empty; + def.ViewId = null; + }); + + + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddList(sourceList) + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddRandomWebPartPage(page => + { + page.AddListViewWebPart(listViewWebpart); + }); + }); + + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart")] + public void CanDeploy_ListViewWebPart_ByListId() + { + WithDisabledDefinitionImmutabilityValidation(() => + { + var sourceList = ModelGeneratorService.GetRandomDefinition(def => { }); + var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => + { + def.ListId = Guid.Empty; + def.ListTitle = string.Empty; + def.ListUrl = string.Empty; + + def.ViewName = string.Empty; + def.ViewId = null; + }); + + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddList(sourceList, list => + { + list.OnProvisioned(context => + { + listViewWebpart.ListId = ExtractListId(context); + }); + }) + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddRandomWebPartPage(page => + { + page.AddListViewWebPart(listViewWebpart); + }); + }); + + }); + + TestModel(model); + }); + } + + #endregion + + #region list view binding tests + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart")] + public void CanDeploy_ListViewWebPart_ByViewId() + { + WithDisabledDefinitionImmutabilityValidation(() => + { + + var sourceList = ModelGeneratorService.GetRandomDefinition(def => { }); + var sourceView = ModelGeneratorService.GetRandomDefinition(def => + { def.Fields = new System.Collections.ObjectModel.Collection { BuiltInInternalFieldNames.ID, BuiltInInternalFieldNames.Edit, BuiltInInternalFieldNames.Title - }; - - def.IsDefault = false; - }); - - var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => - { - def.ListId = Guid.Empty; - def.ListTitle = string.Empty; -#pragma warning disable 618 - def.ListUrl = sourceList.GetListUrl(); -#pragma warning restore 618 - - def.ViewName = string.Empty; - def.ViewId = null; - }); - - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddList(sourceList, list => - { - list.AddListView(sourceView, view => - { - view.OnProvisioned(context => - { - listViewWebpart.ViewId = ExtractViewId(context); - }); - }); - }) - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list - .AddRandomWebPartPage(page => - { - page.AddListViewWebPart(listViewWebpart); - }); - }); - - }); - - TestModel(model); - }); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart")] - public void CanDeploy_ListViewWebPart_ByViewName() - { - var sourceList = ModelGeneratorService.GetRandomDefinition(def => { }); - var sourceView = ModelGeneratorService.GetRandomDefinition(def => - { + }; + + def.IsDefault = false; + }); + + var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => + { + def.ListId = Guid.Empty; + def.ListTitle = string.Empty; +#pragma warning disable 618 + def.ListUrl = sourceList.GetListUrl(); +#pragma warning restore 618 + + def.ViewName = string.Empty; + def.ViewId = null; + }); + + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddList(sourceList, list => + { + list.AddListView(sourceView, view => + { + view.OnProvisioned(context => + { + listViewWebpart.ViewId = ExtractViewId(context); + }); + }); + }) + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddRandomWebPartPage(page => + { + page.AddListViewWebPart(listViewWebpart); + }); + }); + + }); + + TestModel(model); + }); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart")] + public void CanDeploy_ListViewWebPart_ByViewName() + { + var sourceList = ModelGeneratorService.GetRandomDefinition(def => { }); + var sourceView = ModelGeneratorService.GetRandomDefinition(def => + { def.Fields = new System.Collections.ObjectModel.Collection { BuiltInInternalFieldNames.ID, BuiltInInternalFieldNames.Edit, BuiltInInternalFieldNames.Title - }; - - def.IsDefault = false; - }); - - var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => - { - def.ListId = Guid.Empty; - def.ListTitle = string.Empty; -#pragma warning disable 618 - def.ListUrl = sourceList.GetListUrl(); -#pragma warning restore 618 - - def.ViewName = sourceView.Title; - def.ViewId = null; - }); - - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddList(sourceList, list => - { - list.AddListView(sourceView); - }) - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list - .AddRandomWebPartPage(page => - { - page.AddListViewWebPart(listViewWebpart); - }); - }); - - }); - - TestModel(model); + }; + + def.IsDefault = false; + }); + + var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => + { + def.ListId = Guid.Empty; + def.ListTitle = string.Empty; +#pragma warning disable 618 + def.ListUrl = sourceList.GetListUrl(); +#pragma warning restore 618 + + def.ViewName = sourceView.Title; + def.ViewId = null; + }); + + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddList(sourceList, list => + { + list.AddListView(sourceView); + }) + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddRandomWebPartPage(page => + { + page.AddListViewWebPart(listViewWebpart); + }); + }); + + }); + + TestModel(model); } [TestMethod] @@ -328,199 +328,322 @@ public void CanDeploy_ListViewWebPart_ByViewUrl() }); TestModel(model); - } - - #endregion - - #region calendar provision issue - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart.Calendar")] - public void CanDeploy_ListViewWebPart_As_CalendarView_ToWebPartPage() - { - // CSOM sometime fails to provision ListViewWebPart + CalendarView #570 - // https://github.com/SubPointSolutions/spmeta2/issues/570 - - var sourceList = ModelGeneratorService.GetRandomDefinition(def => - { - def.TemplateType = BuiltInListTemplateTypeId.Events; - }); - - var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => - { - def.ListId = Guid.Empty; - def.ListTitle = sourceList.Title; - def.ListUrl = string.Empty; - - def.ViewName = string.Empty; - def.ViewId = null; - }); - - var model = SPMeta2Model.NewWebModel(web => - { - web - .AddList(sourceList) - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list.AddRandomWebPartPage(page => - { - page.AddListViewWebPart(listViewWebpart); - }); - }); - }); - - TestModel(model); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart.Calendar")] - public void CanDeploy_ListViewWebPart_As_CalendarView_ToPublishingPage() - { - // CSOM sometime fails to provision ListViewWebPart + CalendarView #570 - // https://github.com/SubPointSolutions/spmeta2/issues/570 - - var sourceList = ModelGeneratorService.GetRandomDefinition(def => - { - def.TemplateType = BuiltInListTemplateTypeId.Events; - }); - - var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => - { - def.ListId = Guid.Empty; - def.ListTitle = sourceList.Title; - def.ListUrl = string.Empty; - - def.ViewName = string.Empty; - def.ViewId = null; - }); - - var model = SPMeta2Model.NewWebModel(web => - { - web - .AddList(sourceList) - .AddHostList(BuiltInListDefinitions.Pages, list => - { - list.AddRandomPublishingPage(page => - { - (page.Value as PublishingPageDefinition).PageLayoutFileName = BuiltInPublishingPageLayoutNames.BlankWebPartPage; - - page.AddListViewWebPart(listViewWebpart); - }); - }); - }); - - TestModel(model); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart.Calendar")] - public void CanDeploy_ListViewWebPart_As_CalendarView_ToWikiPage() - { - // CSOM sometime fails to provision ListViewWebPart + CalendarView #570 - // https://github.com/SubPointSolutions/spmeta2/issues/570 - - var sourceList = ModelGeneratorService.GetRandomDefinition(def => - { - def.TemplateType = BuiltInListTemplateTypeId.Events; - }); - - var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => - { - def.ListId = Guid.Empty; - def.ListTitle = sourceList.Title; - def.ListUrl = string.Empty; - - def.ViewName = string.Empty; - def.ViewId = null; - }); - - var model = SPMeta2Model.NewWebModel(web => - { - web - .AddList(sourceList) - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list.AddRandomWikiPage(page => - { - page.AddListViewWebPart(listViewWebpart); - }); - }); - }); - - TestModel(model); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart.Calendar")] - public void CanDeploy_XsltListViewWebPart_As_GridView() - { - // CSOM issue to get GridView on the XsltLIstViewWebPart done #725 - // https://github.com/SubPointSolutions/spmeta2/issues/725 - - var sourceList = ModelGeneratorService.GetRandomDefinition(def => - { - def.TemplateType = BuiltInListTemplateTypeId.GenericList; - }); - - var sourceListView = ModelGeneratorService.GetRandomDefinition(def => - { - def.Title = Rnd.String(); - def.Type = BuiltInViewType.Grid; - - def.IsDefault = false; - - def.TabularView = null; - + } + + #endregion + + #region calendar provision issue + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart.Calendar")] + public void CanDeploy_ListViewWebPart_As_CalendarView_ToWebPartPage() + { + // CSOM sometime fails to provision ListViewWebPart + CalendarView #570 + // https://github.com/SubPointSolutions/spmeta2/issues/570 + + var sourceList = ModelGeneratorService.GetRandomDefinition(def => + { + def.TemplateType = BuiltInListTemplateTypeId.Events; + }); + + var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => + { + def.ListId = Guid.Empty; + def.ListTitle = sourceList.Title; + def.ListUrl = string.Empty; + + def.ViewName = string.Empty; + def.ViewId = null; + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web + .AddList(sourceList) + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list.AddRandomWebPartPage(page => + { + page.AddListViewWebPart(listViewWebpart); + }); + }); + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart.Calendar")] + public void CanDeploy_ListViewWebPart_As_CalendarView_ToPublishingPage() + { + // CSOM sometime fails to provision ListViewWebPart + CalendarView #570 + // https://github.com/SubPointSolutions/spmeta2/issues/570 + + var sourceList = ModelGeneratorService.GetRandomDefinition(def => + { + def.TemplateType = BuiltInListTemplateTypeId.Events; + }); + + var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => + { + def.ListId = Guid.Empty; + def.ListTitle = sourceList.Title; + def.ListUrl = string.Empty; + + def.ViewName = string.Empty; + def.ViewId = null; + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web + .AddList(sourceList) + .AddHostList(BuiltInListDefinitions.Pages, list => + { + list.AddRandomPublishingPage(page => + { + (page.Value as PublishingPageDefinition).PageLayoutFileName = BuiltInPublishingPageLayoutNames.BlankWebPartPage; + + page.AddListViewWebPart(listViewWebpart); + }); + }); + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart.Calendar")] + public void CanDeploy_ListViewWebPart_As_CalendarView_ToWikiPage() + { + // CSOM sometime fails to provision ListViewWebPart + CalendarView #570 + // https://github.com/SubPointSolutions/spmeta2/issues/570 + + var sourceList = ModelGeneratorService.GetRandomDefinition(def => + { + def.TemplateType = BuiltInListTemplateTypeId.Events; + }); + + var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => + { + def.ListId = Guid.Empty; + def.ListTitle = sourceList.Title; + def.ListUrl = string.Empty; + + def.ViewName = string.Empty; + def.ViewId = null; + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web + .AddList(sourceList) + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list.AddRandomWikiPage(page => + { + page.AddListViewWebPart(listViewWebpart); + }); + }); + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart.Calendar")] + public void CanDeploy_XsltListViewWebPart_As_GridView() + { + // CSOM issue to get GridView on the XsltLIstViewWebPart done #725 + // https://github.com/SubPointSolutions/spmeta2/issues/725 + + var sourceList = ModelGeneratorService.GetRandomDefinition(def => + { + def.TemplateType = BuiltInListTemplateTypeId.GenericList; + }); + + var sourceListView = ModelGeneratorService.GetRandomDefinition(def => + { + def.Title = Rnd.String(); + def.Type = BuiltInViewType.Grid; + + def.IsDefault = false; + + def.TabularView = null; + def.Fields = new Collection { BuiltInInternalFieldNames.ID, BuiltInInternalFieldNames.Title - }; - }); - - var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => - { - def.ListId = Guid.Empty; - def.ListTitle = sourceList.Title; - def.ListUrl = string.Empty; - - def.ViewName = sourceListView.Title; - def.ViewId = null; - }); - - var model = SPMeta2Model.NewWebModel(web => - { - web - .AddList(sourceList, list => - { - list.AddListView(sourceListView); - }) - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - var pageName = string.Empty; - - list.AddRandomWebPartPage(page => - { - pageName = (page.Value as WebPartPageDefinition).FileName; - - page.AddXsltListViewWebPart(listViewWebpart); - - }); - - list.AddDefinitionNode(new XsltListViewWebPartGridModePresenceDefinition - { - PageFileName = pageName, - WebPartDefinitions = new List(new[] { listViewWebpart }) - }, def => - { - def.RegExcludeFromEventsValidation(); - }); - }); - }); - - TestModel(model); - } - - #endregion - } -} + }; + }); + + var listViewWebpart = ModelGeneratorService.GetRandomDefinition(def => + { + def.ListId = Guid.Empty; + def.ListTitle = sourceList.Title; + def.ListUrl = string.Empty; + + def.ViewName = sourceListView.Title; + def.ViewId = null; + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web + .AddList(sourceList, list => + { + list.AddListView(sourceListView); + }) + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + var pageName = string.Empty; + + list.AddRandomWebPartPage(page => + { + pageName = (page.Value as WebPartPageDefinition).FileName; + + page.AddXsltListViewWebPart(listViewWebpart); + + }); + + list.AddDefinitionNode(new XsltListViewWebPartGridModePresenceDefinition + { + PageFileName = pageName, + WebPartDefinitions = new List(new[] { listViewWebpart }) + }, def => + { + def.RegExcludeFromEventsValidation(); + }); + }); + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart.Calendar")] + public void CanDeploy_ListViewWebPart_As_Calender_With_DateRangesOverlap() + { + // ListViewWebPartDefinition doesn't show calendar view #988 + // https://github.com/SubPointSolutions/spmeta2/issues/988 + + var contentTypeDef = ModelGeneratorService.GetRandomDefinition(def => + { + def.ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct; + }); + + var listDef = ModelGeneratorService.GetRandomDefinition(def => + { + //def.TemplateName = BuiltInListTemplates.DocumentLibrary.InternalName; + //def.TemplateType = BuiltInListTemplateTypeId.DocumentLibrary; + + def.TemplateType = BuiltInListTemplateTypeId.DocumentLibrary; + def.ContentTypesEnabled = true; + }); + + var listViewDef = ModelGeneratorService.GetRandomDefinition(def => + { + def.IsDefault = true; + //def.MobileDefaultView = true; + + def.RowLimit = 2147483647; + def.Query = @" + + + + + + + + + "; + + def.ViewData = @" + + + +"; + + def.IsPaged = false; + def.IsDefault = false; + + def.Fields = new System.Collections.ObjectModel.Collection { + BuiltInFieldDefinitions.Title.InternalName, + BuiltInFieldDefinitions.StartDate.InternalName, + BuiltInFieldDefinitions._EndDate.InternalName, + BuiltInFieldDefinitions.Title.InternalName, + + BuiltInFieldDefinitions.Location.InternalName , + BuiltInFieldDefinitions.fAllDayEvent.InternalName , + BuiltInFieldDefinitions.fRecurrence.InternalName , + BuiltInFieldDefinitions.EventType.InternalName + }; + + def.Type = @"Html"; + def.Types = new Collection { + "Calendar", + "Recurrence" + }; + }); + + + var webpartPageDef = ModelGeneratorService.GetRandomDefinition(def => + { + + }); + + var calendarWebPart = ModelGeneratorService.GetRandomDefinition(def => + { + def.ListId = null; + def.ListUrl = null; + + def.ListTitle = listDef.Title; + def.ViewName = listViewDef.Title; + def.ChromeType = @"Default"; + + //def.ZoneId = @"LeftColumn", + //ZoneIndex = 0, + }); + + var siteModel = SPMeta2Model.NewSiteModel(site => + { + site.AddContentType(contentTypeDef, contentType => + { + contentType + .AddContentTypeFieldLink(SPMeta2.BuiltInDefinitions.BuiltInFieldDefinitions.Title) + .AddContentTypeFieldLink(SPMeta2.BuiltInDefinitions.BuiltInFieldDefinitions.StartDate) + .AddContentTypeFieldLink(SPMeta2.BuiltInDefinitions.BuiltInFieldDefinitions._EndDate); + }); + }); + + var webModel = SPMeta2Model.NewWebModel(web => + { + web + .AddList(listDef, list => + { + list + .AddListFieldLink(BuiltInFieldDefinitions.Location) + .AddListFieldLink(BuiltInFieldDefinitions.fAllDayEvent) + .AddListFieldLink(BuiltInFieldDefinitions.fRecurrence) + .AddListFieldLink(BuiltInFieldDefinitions.EventType) + + .AddContentTypeLink(contentTypeDef) + .AddListView(listViewDef); + }) + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddWebPartPage(webpartPageDef, page => + { + page.AddWebPart(calendarWebPart); + }); + }); + }); + + TestModel(siteModel, webModel); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/QuickLaunchNavigationNodeScenariosTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/QuickLaunchNavigationNodeScenariosTest.cs index 0945379ca..74943d128 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/QuickLaunchNavigationNodeScenariosTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/QuickLaunchNavigationNodeScenariosTest.cs @@ -248,6 +248,38 @@ public void CanDeploy_Ordered_QuickLaunchNavigationNodes() #endregion + #region provision order + + [TestMethod] + [TestCategory("Regression.Scenarios.QuickLaunchNavigationNode.Order")] + public void CanDeploy_QuickLaunchNavigationNodes_With_SubWeb() + { + // Incorrect provision order for navigation nodes #1019 + // https://github.com/SubPointSolutions/spmeta2/issues/1019 + + var index = Rnd.Int(); + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddWeb(new WebDefinition() + { + Title = "Forum", + //LCID = 1049, + Url = "Forum" + index, + WebTemplate = BuiltInWebTemplates.Collaboration.CommunitySite + }); + web.AddQuickLaunchNavigationNode(new QuickLaunchNavigationNodeDefinition() + { + Title = "Forum" + index, + Url = "~sitecollection/Forum" + index + }); + }); + + TestModel(model); + } + + #endregion + #region tokens [TestMethod] @@ -270,6 +302,84 @@ public void CanDeploy_QuickLaunchNavigationNode_WithSiteCollectionToken() TestModel(model); } + [TestMethod] + [TestCategory("Regression.Scenarios.QuickLaunchNavigationNode.Tokens.Raw")] + public void CanDeploy_QuickLaunchNavigationNode_WithSiteCollectionToken_Raw() + { + var nav1Node = GenerateNode(n => + { + n.IsExternal = false; + n.Url = string.Format("~sitecollection", Rnd.String()); + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddQuickLaunchNavigationNode(nav1Node); + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.QuickLaunchNavigationNode.Tokens.Raw")] + public void CanDeploy_QuickLaunchNavigationNode_WithSiteCollectionToken_RawSlash() + { + var nav1Node = GenerateNode(n => + { + n.IsExternal = false; + n.Url = string.Format("~sitecollection/", Rnd.String()); + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddQuickLaunchNavigationNode(nav1Node); + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.QuickLaunchNavigationNode.Tokens.Raw")] + public void CanDeploy_QuickLaunchNavigationNode_WithSiteCollectionToken_RawOnSubWeb() + { + var nav1Node = GenerateNode(n => + { + n.IsExternal = false; + n.Url = string.Format("~sitecollection", Rnd.String()); + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddRandomWeb(rndWeb => + { + rndWeb.AddQuickLaunchNavigationNode(nav1Node); + }); + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.QuickLaunchNavigationNode.Tokens.Raw")] + public void CanDeploy_QuickLaunchNavigationNode_WithSiteCollectionToken_RawSlashOnSubWeb() + { + var nav1Node = GenerateNode(n => + { + n.IsExternal = false; + n.Url = string.Format("~sitecollection/", Rnd.String()); + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddRandomWeb(rndWeb => + { + rndWeb.AddQuickLaunchNavigationNode(nav1Node); + }); + }); + + TestModel(model); + } + [TestMethod] [TestCategory("Regression.Scenarios.QuickLaunchNavigationNode.Tokens")] public void CanDeploy_QuickLaunchNavigationNode_WithSiteToken() @@ -291,6 +401,84 @@ public void CanDeploy_QuickLaunchNavigationNode_WithSiteToken() TestModel(model); } + [TestMethod] + [TestCategory("Regression.Scenarios.QuickLaunchNavigationNode.Tokens.Raw")] + public void CanDeploy_QuickLaunchNavigationNode_WithSiteToken_Raw() + { + var nav1Node = GenerateNode(n => + { + n.IsExternal = false; + n.Url = string.Format("~site", Rnd.String()); + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddQuickLaunchNavigationNode(nav1Node); + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.QuickLaunchNavigationNode.Tokens.Raw")] + public void CanDeploy_QuickLaunchNavigationNode_WithSiteToken_RawSlash() + { + var nav1Node = GenerateNode(n => + { + n.IsExternal = false; + n.Url = string.Format("~site/", Rnd.String()); + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddQuickLaunchNavigationNode(nav1Node); + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.QuickLaunchNavigationNode.Tokens.Raw")] + public void CanDeploy_QuickLaunchNavigationNode_WithSiteToken_RawOnSubWeb() + { + var nav1Node = GenerateNode(n => + { + n.IsExternal = false; + n.Url = string.Format("~site", Rnd.String()); + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddRandomWeb(rndWeb => + { + rndWeb.AddQuickLaunchNavigationNode(nav1Node); + }); + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.QuickLaunchNavigationNode.Tokens.Raw")] + public void CanDeploy_QuickLaunchNavigationNode_WithSiteToken_RawSlashOnSubWeb() + { + var nav1Node = GenerateNode(n => + { + n.IsExternal = false; + n.Url = string.Format("~site/", Rnd.String()); + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddRandomWeb(rndWeb => + { + rndWeb.AddQuickLaunchNavigationNode(nav1Node); + }); + }); + + TestModel(model); + } + #endregion #region localization diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/SecurityScenariosTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/SecurityScenariosTest.cs index f277d0bac..ba2933ba0 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/SecurityScenariosTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/SecurityScenariosTest.cs @@ -208,6 +208,32 @@ public void CanDeploy_ResetRoleInheritance_On_WebPartPage() TestModel(model); } + private ModelNode GetSiteInsfrastructureModel() + { + var model = SPMeta2Model.NewSiteModel(site => + { + site.AddSiteFeature(BuiltInSiteFeatures.SharePointServerPublishingInfrastructure.Inherit(f => + { + f.Enable = true; + })); + }); + + return model; + } + + private ModelNode GetWebInsfrastructureModel() + { + var model = SPMeta2Model.NewWebModel(web => + { + web.AddWebFeature(BuiltInWebFeatures.SharePointServerPublishing.Inherit(f => + { + f.Enable = true; + })); + }); + + return model; + } + [TestMethod] [TestCategory("Regression.Scenarios.Security.Pages")] public void CanDeploy_ResetRoleInheritance_On_Publishingage() @@ -236,7 +262,13 @@ public void CanDeploy_ResetRoleInheritance_On_Publishingage() }); }); - TestModel(model); + var models = new[]{ + GetSiteInsfrastructureModel(), + GetWebInsfrastructureModel(), + model + }; + + TestModels(models); } [TestMethod] @@ -478,7 +510,13 @@ public void CanDeploy_BreakRoleInheritance_On_PublishingPage() }); }); - TestModel(model); + var models = new[]{ + GetSiteInsfrastructureModel(), + GetWebInsfrastructureModel(), + model + }; + + TestModels(models); } @@ -521,8 +559,6 @@ public void CanDeploy_ResetRoleInheritance_OnListItem() #region break role inheritance and amount of security groups - - [TestMethod] [TestCategory("Regression.Scenarios.Security")] public void CanDeploy_SecurityGroupLink_AsSingleItem() @@ -986,7 +1022,42 @@ public void CanDeploy_SecurityGroupLink_OnPublishingPage() }); - TestModels(new ModelNode[] { siteModel, webModel }); + var models = new[]{ + GetSiteInsfrastructureModel(), + GetWebInsfrastructureModel(), + siteModel, + webModel + }; + + TestModels(models); + } + + #endregion + + #region role links order + + [TestMethod] + [TestCategory("Regression.Scenarios.Security.RoleLinks.Order")] + public void CanDeploy_SecurityRoleLink_Under_SecurityGroup() + { + // Incorrect provision order for SecurityGroup / SecurityRole #1017 + // https://github.com/SubPointSolutions/spmeta2/issues/1017 + + var securityGroupDef = ModelGeneratorService.GetRandomDefinition(); + var securityRoleDef = ModelGeneratorService.GetRandomDefinition(); + + var siteModel = SPMeta2Model.NewSiteModel(site => + { + site + .AddSecurityRole(securityRoleDef) + .AddSecurityGroup(securityGroupDef, securityGroup => + { + securityGroup.AddSecurityRoleLink(securityRoleDef.Name); + }); + }); + + + TestModel(siteModel); } #endregion @@ -1240,8 +1311,10 @@ public void CanDeploy_SecurityGroupLink_ByIsAssociatedVisitorGroup() protected void TurnOffValidation(ModelNode node) { + node.RegExcludeFromValidation(); + //node.Value.RequireSelfProcessing = false; - node.Options.RequireSelfProcessing = false; + //node.Options.RequireSelfProcessing = false; } protected BreakRoleInheritanceDefinition GetCleanInheritance() diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs index 1355996e4..e551e70ee 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs @@ -22,6 +22,8 @@ using SPMeta2.Utils; using SPMeta2.Exceptions; +using SPMeta2.Containers.Extensions; + namespace SPMeta2.Regression.Tests.Impl.Scenarios { [TestClass] @@ -216,6 +218,77 @@ public void CanDeploy_WorkflowAssociation_UnderContentTypeLink() AddDefaultWorkflowFeatures(site); }); + var model = SPMeta2Model.NewWebModel(web => + { + web.AddList(taskList); + web.AddList(historyList); + + web.AddRandomList(list => + { + ((list.Value) as ListDefinition).ContentTypesEnabled = true; + + list.AddContentTypeLink(contentTypeDef, contentTypeLink => + { + contentTypeLink.AddWorkflowAssociation(workflowDef); + contentTypeLink.AddWorkflowAssociation(workflowDefChanges); + }); + }); + }); + + TestModel(siteModel, model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.WorkflowAssociation")] + public void CanDeploy_WorkflowAssociation_UnderContentTypeLink_ReadOnly() + { + var contentTypeDef = ModelGeneratorService.GetRandomDefinition(def => + { + def.ReadOnly = true; + }); + + var taskList = ModelGeneratorService.GetRandomDefinition(def => + { + def.Hidden = true; + def.TemplateType = BuiltInListTemplateTypeId.Tasks; + def.ContentTypesEnabled = true; + }); + + var historyList = ModelGeneratorService.GetRandomDefinition(def => + { + def.Hidden = true; + def.TemplateType = BuiltInListTemplateTypeId.WorkflowHistory; + }); + + var workflowDef = ModelGeneratorService.GetRandomDefinition(def => + { + def.TaskListTitle = taskList.Title; + def.HistoryListTitle = historyList.Title; + }); + + // changability + // deploy the same association with different props + var workflowDefChanges = workflowDef.Inherit(def => + { + var value = Rnd.Bool(); + + def.AllowManual = value; + def.AutoStartChange = !value; + def.AutoStartCreate = value; + + def.AssociationData = Rnd.String(); + }); + + var siteModel = SPMeta2Model.NewSiteModel(site => + { + site.AddContentType(contentTypeDef, contentType => + { + contentType.RegExcludeFromValidation(); + }); + + AddDefaultWorkflowFeatures(site); + }); + var model = SPMeta2Model.NewWebModel(web => { web.AddList(taskList); @@ -329,5 +402,78 @@ public void CanDeploy_WorkflowAssociation_UnderContentType() webModel, siteModel }); } + + [TestMethod] + [TestCategory("Regression.Scenarios.WorkflowAssociation")] + public void CanDeploy_WorkflowAssociation_UnderContentType_ReadOnly() + { + // .AddWorkflowAssociation() for Read Only Content Types throws error #1001 + // https://github.com/SubPointSolutions/spmeta2/issues/1001 + + var taskList = ModelGeneratorService.GetRandomDefinition(def => + { + def.Hidden = true; + def.TemplateType = BuiltInListTemplateTypeId.Tasks; + }); + + var historyList = ModelGeneratorService.GetRandomDefinition(def => + { + def.Hidden = true; + def.TemplateType = BuiltInListTemplateTypeId.WorkflowHistory; + }); + + var workflowDef = ModelGeneratorService.GetRandomDefinition(def => + { + def.TaskListTitle = taskList.Title; + def.HistoryListTitle = historyList.Title; + }); + + var initialSiteModel = SPMeta2Model.NewSiteModel(site => + { + AddDefaultWorkflowFeatures(site); + }); + + var readOnlyContentTypeDef = ModelGeneratorService.GetRandomDefinition(def => + { + def.ReadOnly = true; + }); + + // changability + // deploy the same association with different props + var workflowDefChanges = workflowDef.Inherit(def => + { + var value = Rnd.Bool(); + + def.AllowManual = value; + def.AutoStartChange = !value; + def.AutoStartCreate = value; + + def.AssociationData = Rnd.String(); + }); + + // lists are to be deployed before contet type + // workflow association on the cotnent type references lists + var webModel = SPMeta2Model.NewWebModel(web => + { + web.AddList(historyList); + web.AddList(taskList); + }); + + var siteModel = SPMeta2Model.NewSiteModel(site => + { + site.AddContentType(readOnlyContentTypeDef, contentType => + { + contentType.RegExcludeFromValidation(); + + contentType.AddWorkflowAssociation(workflowDef); + contentType.AddWorkflowAssociation(workflowDefChanges); + }); + }); + + TestModels(new ModelNode[] { + initialSiteModel, + webModel, + siteModel }); + } } } diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Syntax/TypedSyntaxTests.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Syntax/TypedSyntaxTests.cs index 91b7e159a..9fbd9bfbc 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Syntax/TypedSyntaxTests.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Syntax/TypedSyntaxTests.cs @@ -43,6 +43,8 @@ public void CanPassTypedSyntax_FarmLevel() farm.AddDiagnosticsServiceBase(new DiagnosticsServiceBaseDefinition()); farm.AddDeveloperDashboardSettings(new DeveloperDashboardSettingsDefinition()); + + farm.AddWebApplication(new WebApplicationDefinition()); }); } @@ -67,6 +69,12 @@ public void CanPassTypedSyntax_WebApplicationLevel() webApplication.AddPrefix(new PrefixDefinition()); webApplication.AddContentDatabase(new ContentDatabaseDefinition()); + + webApplication.AddOfficialFileHost(new OfficialFileHostDefinition()); + + webApplication.AddSuiteBar(new SuiteBarDefinition()); + + webApplication.AddFarmSolution(new FarmSolutionDefinition()); }); } diff --git a/SPMeta2/SPMeta2.Regression.Tests/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.Tests/Properties/AssemblyInfo.cs index 9b5cf2a5c..f28be4170 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Properties/AssemblyInfo.cs +++ b/SPMeta2/SPMeta2.Regression.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.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2.Regression.Tests/SPMeta2.Regression.Tests.csproj b/SPMeta2/SPMeta2.Regression.Tests/SPMeta2.Regression.Tests.csproj index f2fd22710..665b03afc 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/SPMeta2.Regression.Tests.csproj +++ b/SPMeta2/SPMeta2.Regression.Tests/SPMeta2.Regression.Tests.csproj @@ -155,6 +155,12 @@ Always + + Always + + + Always + Always diff --git a/SPMeta2/SPMeta2.Regression/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression/Properties/AssemblyInfo.cs index 91e1ca507..4e26901d7 100644 --- a/SPMeta2/SPMeta2.Regression/Properties/AssemblyInfo.cs +++ b/SPMeta2/SPMeta2.Regression/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.0.17104.0417")] +[assembly: AssemblyFileVersion("1.0.17191.0958")] diff --git a/SPMeta2/SPMeta2.Regression/Service/RegressionTraceService.cs b/SPMeta2/SPMeta2.Regression/Service/RegressionTraceService.cs index 87324cd11..1e450aae8 100644 --- a/SPMeta2/SPMeta2.Regression/Service/RegressionTraceService.cs +++ b/SPMeta2/SPMeta2.Regression/Service/RegressionTraceService.cs @@ -5,6 +5,7 @@ using System.IO; using System.Linq; using System.Text; +using System.Threading; namespace SPMeta2.Regression.Service @@ -22,7 +23,10 @@ public RegressionTraceService() IsErrorEnabled = true; IsCriticalEnabled = true; - var fileName = string.Format("spmeta2.regression.{0}.log", GetTimestamp()); + var domainId = AppDomain.CurrentDomain.Id; + var threadId = Thread.CurrentThread.ManagedThreadId; + + var fileName = string.Format("spmeta2.regression.{0}-{1}.{2}.log", domainId, threadId, GetTimestamp()); LogFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fileName); } diff --git a/SPMeta2/SPMeta2.SSOM.Standard/ModelHandlers/Fields/TaxonomyFieldModelHandler.cs b/SPMeta2/SPMeta2.SSOM.Standard/ModelHandlers/Fields/TaxonomyFieldModelHandler.cs index 90b0a9027..cf35392cf 100644 --- a/SPMeta2/SPMeta2.SSOM.Standard/ModelHandlers/Fields/TaxonomyFieldModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM.Standard/ModelHandlers/Fields/TaxonomyFieldModelHandler.cs @@ -1,199 +1,202 @@ -using System; -using System.Linq; -using System.Xml.Linq; -using Microsoft.SharePoint; -using Microsoft.SharePoint.Taxonomy; -using SPMeta2.Definitions; -using SPMeta2.Definitions.Fields; -using SPMeta2.Enumerations; -using SPMeta2.SSOM.ModelHandlers; -using SPMeta2.Standard.Definitions.Fields; -using SPMeta2.Utils; - -namespace SPMeta2.SSOM.Standard.ModelHandlers.Fields -{ - public class TaxonomyFieldModelHandler : FieldModelHandler - { - #region properties - - public override Type TargetType - { - get { return typeof(TaxonomyFieldDefinition); } - } - - protected override Type GetTargetFieldType(FieldDefinition model) - { - return typeof(TaxonomyField); - } - - #endregion - - #region methods - - protected override void ProcessFieldProperties(SPField field, FieldDefinition fieldModel) - { - // let base setting be setup - base.ProcessFieldProperties(field, fieldModel); - - // process taxonomy field specific properties - var taxField = field.WithAssertAndCast("field", value => value.RequireNotNull()); - var taxFieldModel = fieldModel.WithAssertAndCast("model", value => value.RequireNotNull()); - - var site = GetCurrentSite(); - - taxField.AllowMultipleValues = taxFieldModel.IsMulti; - - if (taxFieldModel.Open.HasValue) - taxField.Open = taxFieldModel.Open.Value; - - if (taxFieldModel.CreateValuesInEditForm.HasValue) - taxField.CreateValuesInEditForm = taxFieldModel.CreateValuesInEditForm.Value; - - if (taxFieldModel.IsPathRendered.HasValue) - taxField.IsPathRendered = taxFieldModel.IsPathRendered.Value; - - TermStore tesmStore = LookupTermStore(site, taxFieldModel); - - if (tesmStore != null) - { - taxField.SspId = tesmStore.Id; - - TermSet termSet = LookupTermSet(site, tesmStore, taxFieldModel); - Term term = LookupTerm(site, tesmStore, taxFieldModel); - - if (termSet != null) - taxField.TermSetId = termSet.Id; - - if (term != null) - taxField.AnchorId = term.Id; - } - } - - public static Term LookupTerm(SPSite site, TermStore tesmStore, TaxonomyFieldDefinition taxFieldModel) - { - Group currentGroup = null; - - var termGroupName = taxFieldModel.TermGroupName; - var groupId = taxFieldModel.TermGroupId; - var isSiteCollectionGroup = taxFieldModel.IsSiteCollectionGroup; - - if (!string.IsNullOrEmpty(termGroupName)) - { - currentGroup = tesmStore.Groups.FirstOrDefault(g => g.Name.ToUpper() == termGroupName.ToUpper()); - } - else if (groupId != null && groupId.HasGuidValue()) - { - currentGroup = tesmStore.GetGroup(groupId.Value); - } - else if (isSiteCollectionGroup.HasValue && isSiteCollectionGroup.Value) - { - currentGroup = tesmStore.GetSiteCollectionGroup(site); - } - - // TODO - // that should also check if the TermSet is there, so to scope the term - - if (currentGroup != null) - { - if (taxFieldModel.TermId.HasValue) - return tesmStore.GetTerm(taxFieldModel.TermId.Value); - - if (!string.IsNullOrEmpty(taxFieldModel.TermName)) - { - return tesmStore.GetTerms(taxFieldModel.TermName, taxFieldModel.TermLCID, false) - .FirstOrDefault(t => t.TermSet.Group.Name == currentGroup.Name); - } - } - else - { - if (taxFieldModel.TermId.HasValue) - return tesmStore.GetTerm(taxFieldModel.TermId.Value); - - if (!string.IsNullOrEmpty(taxFieldModel.TermName)) - return tesmStore.GetTerms(taxFieldModel.TermName, taxFieldModel.TermLCID, false).FirstOrDefault(); - } - - return null; - } - - public static TermSet LookupTermSet(SPSite site, TermStore tesmStore, TaxonomyFieldDefinition taxFieldModel) - { - return LookupTermSet(tesmStore, - - taxFieldModel.TermGroupName, - taxFieldModel.TermGroupId, - taxFieldModel.IsSiteCollectionGroup, - - site, - - taxFieldModel.TermSetName, - taxFieldModel.TermSetId, - taxFieldModel.TermSetLCID - ); - } - - [Obsolete("Use LookupTermSet(TermStore tesmStore, string termGroupName, bool? isSiteCollectionGroup, Guid? groupid,string termSetName, Guid? termSetId, int termSetLCID) passing term group name / id as nulls")] - public static TermSet LookupTermSet(TermStore tesmStore, - string termSetName, Guid? termSetId, int termSetLCID) - { - return LookupTermSet(tesmStore, null, null, null, null, termSetName, termSetId, termSetLCID); - } - - public static TermSet LookupTermSet( - TermStore tesmStore, - string termGroupName, Guid? groupId, bool? isSiteCollectionGroup, SPSite site, - string termSetName, Guid? termSetId, int termSetLCID) - { - Group currentGroup = null; - - if (!string.IsNullOrEmpty(termGroupName)) - { - currentGroup = tesmStore.Groups.FirstOrDefault(g => g.Name.ToUpper() == termGroupName.ToUpper()); - } - else if (groupId != null && groupId.HasGuidValue()) - { - currentGroup = tesmStore.GetGroup(groupId.Value); - } - else if (isSiteCollectionGroup.HasValue && isSiteCollectionGroup.Value) - { - currentGroup = tesmStore.GetSiteCollectionGroup(site); - } - - if (termSetId.HasGuidValue()) - { - if (currentGroup != null) - return currentGroup.TermSets.FirstOrDefault(t => t.Id == termSetId.Value); - - return tesmStore.GetTermSet(termSetId.Value); - } - - if (!string.IsNullOrEmpty(termSetName)) - { - if (currentGroup != null) - return currentGroup.TermSets.FirstOrDefault(t => t.Name.ToUpper() == termSetName.ToUpper()); - - return tesmStore.GetTermSets(termSetName, termSetLCID).FirstOrDefault(); - } - - return null; - } - - public static TermStore LookupTermStore(SPSite site, TaxonomyFieldDefinition taxFieldModel) - { - var taxSession = new TaxonomySession(site); - - if (taxFieldModel.UseDefaultSiteCollectionTermStore == true) - return taxSession.DefaultSiteCollectionTermStore; - - if (taxFieldModel.SspId.HasValue) - return taxSession.TermStores[taxFieldModel.SspId.Value]; - - if (!string.IsNullOrEmpty(taxFieldModel.SspName)) - return taxSession.TermStores[taxFieldModel.SspName]; - - return null; - } - - #endregion - } -} +using System; +using System.Linq; +using System.Xml.Linq; +using Microsoft.SharePoint; +using Microsoft.SharePoint.Taxonomy; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Fields; +using SPMeta2.Enumerations; +using SPMeta2.SSOM.ModelHandlers; +using SPMeta2.Standard.Definitions.Fields; +using SPMeta2.Utils; + +namespace SPMeta2.SSOM.Standard.ModelHandlers.Fields +{ + public class TaxonomyFieldModelHandler : FieldModelHandler + { + #region properties + + public override Type TargetType + { + get { return typeof(TaxonomyFieldDefinition); } + } + + protected override Type GetTargetFieldType(FieldDefinition model) + { + return typeof(TaxonomyField); + } + + #endregion + + #region methods + + protected override void ProcessFieldProperties(SPField field, FieldDefinition fieldModel) + { + // let base setting be setup + base.ProcessFieldProperties(field, fieldModel); + + // process taxonomy field specific properties + var taxField = field.WithAssertAndCast("field", value => value.RequireNotNull()); + var taxFieldModel = fieldModel.WithAssertAndCast("model", value => value.RequireNotNull()); + + var site = GetCurrentSite(); + + taxField.AllowMultipleValues = taxFieldModel.IsMulti; + + if (taxFieldModel.UserCreated.HasValue) + taxField.UserCreated = taxFieldModel.UserCreated.Value; + + if (taxFieldModel.Open.HasValue) + taxField.Open = taxFieldModel.Open.Value; + + if (taxFieldModel.CreateValuesInEditForm.HasValue) + taxField.CreateValuesInEditForm = taxFieldModel.CreateValuesInEditForm.Value; + + if (taxFieldModel.IsPathRendered.HasValue) + taxField.IsPathRendered = taxFieldModel.IsPathRendered.Value; + + TermStore tesmStore = LookupTermStore(site, taxFieldModel); + + if (tesmStore != null) + { + taxField.SspId = tesmStore.Id; + + TermSet termSet = LookupTermSet(site, tesmStore, taxFieldModel); + Term term = LookupTerm(site, tesmStore, taxFieldModel); + + if (termSet != null) + taxField.TermSetId = termSet.Id; + + if (term != null) + taxField.AnchorId = term.Id; + } + } + + public static Term LookupTerm(SPSite site, TermStore tesmStore, TaxonomyFieldDefinition taxFieldModel) + { + Group currentGroup = null; + + var termGroupName = taxFieldModel.TermGroupName; + var groupId = taxFieldModel.TermGroupId; + var isSiteCollectionGroup = taxFieldModel.IsSiteCollectionGroup; + + if (!string.IsNullOrEmpty(termGroupName)) + { + currentGroup = tesmStore.Groups.FirstOrDefault(g => g.Name.ToUpper() == termGroupName.ToUpper()); + } + else if (groupId != null && groupId.HasGuidValue()) + { + currentGroup = tesmStore.GetGroup(groupId.Value); + } + else if (isSiteCollectionGroup.HasValue && isSiteCollectionGroup.Value) + { + currentGroup = tesmStore.GetSiteCollectionGroup(site); + } + + // TODO + // that should also check if the TermSet is there, so to scope the term + + if (currentGroup != null) + { + if (taxFieldModel.TermId.HasValue) + return tesmStore.GetTerm(taxFieldModel.TermId.Value); + + if (!string.IsNullOrEmpty(taxFieldModel.TermName)) + { + return tesmStore.GetTerms(taxFieldModel.TermName, taxFieldModel.TermLCID, false) + .FirstOrDefault(t => t.TermSet.Group.Name == currentGroup.Name); + } + } + else + { + if (taxFieldModel.TermId.HasValue) + return tesmStore.GetTerm(taxFieldModel.TermId.Value); + + if (!string.IsNullOrEmpty(taxFieldModel.TermName)) + return tesmStore.GetTerms(taxFieldModel.TermName, taxFieldModel.TermLCID, false).FirstOrDefault(); + } + + return null; + } + + public static TermSet LookupTermSet(SPSite site, TermStore tesmStore, TaxonomyFieldDefinition taxFieldModel) + { + return LookupTermSet(tesmStore, + + taxFieldModel.TermGroupName, + taxFieldModel.TermGroupId, + taxFieldModel.IsSiteCollectionGroup, + + site, + + taxFieldModel.TermSetName, + taxFieldModel.TermSetId, + taxFieldModel.TermSetLCID + ); + } + + [Obsolete("Use LookupTermSet(TermStore tesmStore, string termGroupName, bool? isSiteCollectionGroup, Guid? groupid,string termSetName, Guid? termSetId, int termSetLCID) passing term group name / id as nulls")] + public static TermSet LookupTermSet(TermStore tesmStore, + string termSetName, Guid? termSetId, int termSetLCID) + { + return LookupTermSet(tesmStore, null, null, null, null, termSetName, termSetId, termSetLCID); + } + + public static TermSet LookupTermSet( + TermStore tesmStore, + string termGroupName, Guid? groupId, bool? isSiteCollectionGroup, SPSite site, + string termSetName, Guid? termSetId, int termSetLCID) + { + Group currentGroup = null; + + if (!string.IsNullOrEmpty(termGroupName)) + { + currentGroup = tesmStore.Groups.FirstOrDefault(g => g.Name.ToUpper() == termGroupName.ToUpper()); + } + else if (groupId != null && groupId.HasGuidValue()) + { + currentGroup = tesmStore.GetGroup(groupId.Value); + } + else if (isSiteCollectionGroup.HasValue && isSiteCollectionGroup.Value) + { + currentGroup = tesmStore.GetSiteCollectionGroup(site); + } + + if (termSetId.HasGuidValue()) + { + if (currentGroup != null) + return currentGroup.TermSets.FirstOrDefault(t => t.Id == termSetId.Value); + + return tesmStore.GetTermSet(termSetId.Value); + } + + if (!string.IsNullOrEmpty(termSetName)) + { + if (currentGroup != null) + return currentGroup.TermSets.FirstOrDefault(t => t.Name.ToUpper() == termSetName.ToUpper()); + + return tesmStore.GetTermSets(termSetName, termSetLCID).FirstOrDefault(); + } + + return null; + } + + public static TermStore LookupTermStore(SPSite site, TaxonomyFieldDefinition taxFieldModel) + { + var taxSession = new TaxonomySession(site); + + if (taxFieldModel.UseDefaultSiteCollectionTermStore == true) + return taxSession.DefaultSiteCollectionTermStore; + + if (taxFieldModel.SspId.HasValue) + return taxSession.TermStores[taxFieldModel.SspId.Value]; + + if (!string.IsNullOrEmpty(taxFieldModel.SspName)) + return taxSession.TermStores[taxFieldModel.SspName]; + + return null; + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.SSOM.Standard/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.SSOM.Standard/Properties/AssemblyInfo.cs index bf184884d..b22195591 100644 --- a/SPMeta2/SPMeta2.SSOM.Standard/Properties/AssemblyInfo.cs +++ b/SPMeta2/SPMeta2.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.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypeLinkModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypeLinkModelHandler.cs index 0db546618..fbf1dc05a 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypeLinkModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypeLinkModelHandler.cs @@ -31,11 +31,22 @@ protected SPContentType GetListContentType(SPList list, ContentTypeLinkDefinitio if (result == null && !string.IsNullOrEmpty(definition.ContentTypeId)) { - var linkContenType = new SPContentTypeId(definition.ContentTypeId); - var bestMatch = list.ContentTypes.BestMatch(linkContenType); + var linkContentType = new SPContentTypeId(definition.ContentTypeId); - if (bestMatch.IsChildOf(linkContenType)) - result = list.ContentTypes[bestMatch]; + // "Item" ContentTypeLink #1016 + // replacing best match, it does not work on list scoped content types + + // Content type operations within a list + // http://docs.subpointsolutions.com/spmeta2/kb/kb-m2-000003.html + + //var bestMatch = list.ContentTypes.BestMatch(linkContenType); + + //if (bestMatch.IsChildOf(linkContenType)) + // result = list.ContentTypes[bestMatch]; + + result = list.ContentTypes + .OfType() + .FirstOrDefault(ct => ct.Parent.Id == linkContentType); } return result; @@ -64,7 +75,10 @@ public override void WithResolvingModelHost(ModelHostResolveContext modelHostCon action(contentTypeLinkHost); if (contentTypeLinkHost.ShouldUpdateHost) - contentType.Update(false); + { + if (!contentType.ReadOnly) + contentType.Update(false); + } } public override void DeployModel(object modelHost, DefinitionBase model) @@ -78,17 +92,28 @@ public override void DeployModel(object modelHost, DefinitionBase model) { var web = list.ParentWeb; - var contentTypeId = new SPContentTypeId(contentTypeLinkModel.ContentTypeId); - var targetContentType = web.AvailableContentTypes[contentTypeId]; + SPContentType targetContentType = null; + + // load by id, then fallback on name + if (!string.IsNullOrEmpty(contentTypeLinkModel.ContentTypeId)) + { + var contentTypeId = new SPContentTypeId(contentTypeLinkModel.ContentTypeId); + targetContentType = web.AvailableContentTypes[contentTypeId]; + } + + if (targetContentType == null && !string.IsNullOrEmpty(contentTypeLinkModel.ContentTypeName)) + { + targetContentType = web.AvailableContentTypes[contentTypeLinkModel.ContentTypeName]; + } if (targetContentType == null) { TraceService.ErrorFormat((int)LogEventId.ModelProvisionCoreCall, - "Cannot find site content type by ID: [{0}]. Throwing SPMeta2Exception.", - contentTypeId); + "Cannot find site content type by ID: [{0}] or Name:[{1}].", + new object[] { contentTypeLinkModel.ContentTypeId, contentTypeLinkModel.ContentTypeName }); - throw new SPMeta2Exception(string.Format("Cannot find site content type with ID [{0}].", - contentTypeId)); + throw new SPMeta2Exception(string.Format("Cannot find site content type by ID: [{0}] or Name:[{1}].", + new object[] { contentTypeLinkModel.ContentTypeId, contentTypeLinkModel.ContentTypeName })); } var currentListContentType = GetListContentType(list, contentTypeLinkModel); diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypeModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypeModelHandler.cs index 39115acaa..ceb3ebe31 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypeModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypeModelHandler.cs @@ -60,7 +60,9 @@ public override void WithResolvingModelHost(ModelHostResolveContext modelHostCon })); } - targetContentType.Update(true); + if (!targetContentType.ReadOnly) + targetContentType.Update(true); + tmpRootWeb.Update(); } } diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypes/HideContentTypeLinksModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypes/HideContentTypeLinksModelHandler.cs index f86bb4eb6..0f5a67976 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypes/HideContentTypeLinksModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypes/HideContentTypeLinksModelHandler.cs @@ -1,117 +1,116 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.SharePoint; -using SPMeta2.Common; -using SPMeta2.Definitions; -using SPMeta2.Definitions.ContentTypes; -using SPMeta2.Services; -using SPMeta2.SSOM.ModelHandlers.ContentTypes.Base; -using SPMeta2.SSOM.ModelHosts; -using SPMeta2.Utils; - -namespace SPMeta2.SSOM.ModelHandlers.ContentTypes -{ - public class HideContentTypeLinksModelHandler : ContentTypeLinksModelHandlerBase - { - #region properties - - public override Type TargetType - { - get { return typeof(HideContentTypeLinksDefinition); } - } - - #endregion - - #region methods - - public override void DeployModel(object modelHost, DefinitionBase model) - { - var list = ExtractListFromHost(modelHost); - var folder = ExtractFolderFromHost(modelHost); - - var hideContentTypeLinksDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - - DeployHideContentTypeLinks(modelHost, list, folder, hideContentTypeLinksDefinition); - } - - private void DeployHideContentTypeLinks(object modelHost, SPList list, SPFolder folder, HideContentTypeLinksDefinition contentTypeOrderDefinition) - { - var oldContentTypeOrder = folder.ContentTypeOrder; - var newContentTypeOrder = oldContentTypeOrder; - - var listContentTypes = list.ContentTypes.OfType().ToList(); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioning, - Object = folder, - ObjectType = typeof(SPFolder), - ObjectDefinition = contentTypeOrderDefinition, - ModelHost = modelHost - }); - - // re-order - foreach (var srcContentTypeDef in contentTypeOrderDefinition.ContentTypes) - { - SPContentType listContentType = null; - - if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeName)) - { - listContentType = listContentTypes.FirstOrDefault(c => c.Name.ToUpper() == srcContentTypeDef.ContentTypeName.ToUpper()); - - if (listContentType != null) - { - TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, - string.Format("Found content type by name:[{0}]", srcContentTypeDef.ContentTypeName)); - } - } - - if (listContentType == null && !string.IsNullOrEmpty(srcContentTypeDef.ContentTypeId)) - { - listContentType = - listContentTypes.FirstOrDefault( - c => c.Id.ToString().ToUpper().StartsWith(srcContentTypeDef.ContentTypeId.ToUpper())); - - if (listContentType != null) - { - TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, - string.Format("Found content type by matching ID start:[{0}]", srcContentTypeDef.ContentTypeId)); - } - } - - if (listContentType != null) - { - var existingCt = newContentTypeOrder.FirstOrDefault(ct => ct.Name == listContentType.Name || ct.Id == listContentType.Id); - - if (existingCt != null && newContentTypeOrder.Contains(existingCt)) - { - TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, - string.Format("Removing content type from the ordering")); - newContentTypeOrder.Remove(existingCt); - } - } - } - - if (newContentTypeOrder.Count() > 0) - folder.UniqueContentTypeOrder = newContentTypeOrder; - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioned, - Object = folder, - ObjectType = typeof(SPFolder), - ObjectDefinition = contentTypeOrderDefinition, - ModelHost = modelHost - }); - - folder.Update(); - } - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.SharePoint; +using SPMeta2.Common; +using SPMeta2.Definitions; +using SPMeta2.Definitions.ContentTypes; +using SPMeta2.Services; +using SPMeta2.SSOM.ModelHandlers.ContentTypes.Base; +using SPMeta2.SSOM.ModelHosts; +using SPMeta2.Utils; + +namespace SPMeta2.SSOM.ModelHandlers.ContentTypes +{ + public class HideContentTypeLinksModelHandler : ContentTypeLinksModelHandlerBase + { + #region properties + + public override Type TargetType + { + get { return typeof(HideContentTypeLinksDefinition); } + } + + #endregion + + #region methods + + public override void DeployModel(object modelHost, DefinitionBase model) + { + var list = ExtractListFromHost(modelHost); + var folder = ExtractFolderFromHost(modelHost); + + var hideContentTypeLinksDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + DeployHideContentTypeLinks(modelHost, list, folder, hideContentTypeLinksDefinition); + } + + private void DeployHideContentTypeLinks(object modelHost, SPList list, SPFolder folder, HideContentTypeLinksDefinition contentTypeOrderDefinition) + { + var oldContentTypeOrder = folder.ContentTypeOrder; + var newContentTypeOrder = oldContentTypeOrder; + + var listContentTypes = list.ContentTypes.OfType().ToList(); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = folder, + ObjectType = typeof(SPFolder), + ObjectDefinition = contentTypeOrderDefinition, + ModelHost = modelHost + }); + + // re-order + foreach (var srcContentTypeDef in contentTypeOrderDefinition.ContentTypes) + { + SPContentType listContentType = null; + + if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeName)) + { + listContentType = listContentTypes.FirstOrDefault(c => c.Name.ToUpper() == srcContentTypeDef.ContentTypeName.ToUpper()); + + if (listContentType != null) + { + TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, + string.Format("Found content type by name:[{0}]", srcContentTypeDef.ContentTypeName)); + } + } + + if (listContentType == null && !string.IsNullOrEmpty(srcContentTypeDef.ContentTypeId)) + { + var spContentTypeId = new SPContentTypeId(srcContentTypeDef.ContentTypeId); + listContentType = listContentTypes.FirstOrDefault(c => c.Parent.Id == spContentTypeId); + + if (listContentType != null) + { + TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, + string.Format("Found content type by matching parent ID:[{0}]", srcContentTypeDef.ContentTypeId)); + } + } + + if (listContentType != null) + { + var existingCt = newContentTypeOrder.FirstOrDefault(ct => ct.Name == listContentType.Name || ct.Id == listContentType.Id); + + if (existingCt != null && newContentTypeOrder.Contains(existingCt)) + { + TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, + string.Format("Removing content type from the ordering")); + newContentTypeOrder.Remove(existingCt); + } + } + } + + if (newContentTypeOrder.Count() > 0) + folder.UniqueContentTypeOrder = newContentTypeOrder; + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = folder, + ObjectType = typeof(SPFolder), + ObjectDefinition = contentTypeOrderDefinition, + ModelHost = modelHost + }); + + folder.Update(); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypes/RemoveContentTypeLinksModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypes/RemoveContentTypeLinksModelHandler.cs index 7d5b41302..4a1a9ca89 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypes/RemoveContentTypeLinksModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypes/RemoveContentTypeLinksModelHandler.cs @@ -66,13 +66,14 @@ private void DeployHideContentTypeLinks(object modelHost, SPList list, RemoveCon } if (listContentType == null && !string.IsNullOrEmpty(srcContentTypeDef.ContentTypeId)) - { - listContentType = listContentTypes.FirstOrDefault(c => c.Id.ToString().ToUpper().StartsWith(srcContentTypeDef.ContentTypeId.ToUpper())); + { + var spContentTypeId = new SPContentTypeId(srcContentTypeDef.ContentTypeId); + listContentType = listContentTypes.FirstOrDefault(c => c.Parent.Id == spContentTypeId); if (listContentType != null) { - TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, - string.Format("Found content type by matching ID start:[{0}]", srcContentTypeDef.ContentTypeId)); + TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, + string.Format("Found content type by matching parent ID:[{0}]", srcContentTypeDef.ContentTypeId)); } } diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypes/UniqueContentTypeOrderModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypes/UniqueContentTypeOrderModelHandler.cs index 1cbe10a13..f0a73ee58 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypes/UniqueContentTypeOrderModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ContentTypes/UniqueContentTypeOrderModelHandler.cs @@ -1,120 +1,121 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.SharePoint; -using SPMeta2.Common; -using SPMeta2.Definitions; -using SPMeta2.Definitions.Base; -using SPMeta2.Definitions.ContentTypes; -using SPMeta2.Services; -using SPMeta2.SSOM.ModelHandlers.ContentTypes.Base; -using SPMeta2.SSOM.ModelHosts; -using SPMeta2.Utils; - -namespace SPMeta2.SSOM.ModelHandlers.ContentTypes -{ - public class UniqueContentTypeOrderModelHandler : ContentTypeLinksModelHandlerBase - { - #region properties - - public override Type TargetType - { - get { return typeof(UniqueContentTypeOrderDefinition); } - } - - #endregion - - #region methods - - public override void DeployModel(object modelHost, DefinitionBase model) - { - var list = ExtractListFromHost(modelHost); - var folder = ExtractFolderFromHost(modelHost); - - var contentTypeOrderDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - - DeployContentTypeOrder(modelHost, list, folder, contentTypeOrderDefinition); - } - - private void DeployContentTypeOrder(object modelHost, SPList list, SPFolder folder, UniqueContentTypeOrderDefinition contentTypeOrderDefinition) - { - var oldContentTypeOrder = folder.ContentTypeOrder; - var newContentTypeOrder = new List(); - - var listContentTypes = list.ContentTypes.OfType().ToList(); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioning, - Object = folder, - ObjectType = typeof(SPFolder), - ObjectDefinition = contentTypeOrderDefinition, - ModelHost = modelHost - }); - - // re-order - foreach (var srcContentTypeDef in contentTypeOrderDefinition.ContentTypes) - { - SPContentType listContentType = null; - - if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeName)) - { - listContentType = listContentTypes.FirstOrDefault(c => c.Name.ToUpper() == srcContentTypeDef.ContentTypeName.ToUpper()); - - if (listContentType != null) - { - TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, - string.Format("Found content type by name:[{0}]", srcContentTypeDef.ContentTypeName)); - } - } - - if (listContentType == null && !string.IsNullOrEmpty(srcContentTypeDef.ContentTypeId)) - { - listContentType = listContentTypes.FirstOrDefault(c => c.Id.ToString().ToUpper().StartsWith(srcContentTypeDef.ContentTypeId.ToUpper())); - - if (listContentType != null) - { - TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, - string.Format("Found content type by matching ID start:[{0}]", srcContentTypeDef.ContentTypeId)); - } - } - - if (listContentType != null && !newContentTypeOrder.Contains(listContentType)) - { - TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, - string.Format("Adding content type to new ordering")); - newContentTypeOrder.Add(listContentType); - } - } - - // filling up gapes - foreach (var oldCt in oldContentTypeOrder) - { - if (newContentTypeOrder.Count(c => - c.Name == oldCt.Name || - c.Id.ToString().ToUpper().StartsWith(oldCt.Id.ToString().ToUpper())) == 0) - newContentTypeOrder.Add(oldCt); - } - - if (newContentTypeOrder.Count() > 0) - folder.UniqueContentTypeOrder = newContentTypeOrder; - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioned, - Object = folder, - ObjectType = typeof(SPFolder), - ObjectDefinition = contentTypeOrderDefinition, - ModelHost = modelHost - }); - - folder.Update(); - } - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.SharePoint; +using SPMeta2.Common; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; +using SPMeta2.Definitions.ContentTypes; +using SPMeta2.Services; +using SPMeta2.SSOM.ModelHandlers.ContentTypes.Base; +using SPMeta2.SSOM.ModelHosts; +using SPMeta2.Utils; + +namespace SPMeta2.SSOM.ModelHandlers.ContentTypes +{ + public class UniqueContentTypeOrderModelHandler : ContentTypeLinksModelHandlerBase + { + #region properties + + public override Type TargetType + { + get { return typeof(UniqueContentTypeOrderDefinition); } + } + + #endregion + + #region methods + + public override void DeployModel(object modelHost, DefinitionBase model) + { + var list = ExtractListFromHost(modelHost); + var folder = ExtractFolderFromHost(modelHost); + + var contentTypeOrderDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + DeployContentTypeOrder(modelHost, list, folder, contentTypeOrderDefinition); + } + + private void DeployContentTypeOrder(object modelHost, SPList list, SPFolder folder, UniqueContentTypeOrderDefinition contentTypeOrderDefinition) + { + var oldContentTypeOrder = folder.ContentTypeOrder; + var newContentTypeOrder = new List(); + + var listContentTypes = list.ContentTypes.OfType().ToList(); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = folder, + ObjectType = typeof(SPFolder), + ObjectDefinition = contentTypeOrderDefinition, + ModelHost = modelHost + }); + + // re-order + foreach (var srcContentTypeDef in contentTypeOrderDefinition.ContentTypes) + { + SPContentType listContentType = null; + + if (!string.IsNullOrEmpty(srcContentTypeDef.ContentTypeName)) + { + listContentType = listContentTypes.FirstOrDefault(c => c.Name.ToUpper() == srcContentTypeDef.ContentTypeName.ToUpper()); + + if (listContentType != null) + { + TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, + string.Format("Found content type by name:[{0}]", srcContentTypeDef.ContentTypeName)); + } + } + + if (listContentType == null && !string.IsNullOrEmpty(srcContentTypeDef.ContentTypeId)) + { + var spContentTypeId = new SPContentTypeId(srcContentTypeDef.ContentTypeId); + listContentType = listContentTypes.FirstOrDefault(c => c.Parent.Id == spContentTypeId); + + if (listContentType != null) + { + TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, + string.Format("Found content type by matching parent ID:[{0}]", srcContentTypeDef.ContentTypeId)); + } + } + + if (listContentType != null && !newContentTypeOrder.Contains(listContentType)) + { + TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, + string.Format("Adding content type to new ordering")); + newContentTypeOrder.Add(listContentType); + } + } + + // filling up gapes + foreach (var oldCt in oldContentTypeOrder) + { + if (newContentTypeOrder.Count(c => + c.Name == oldCt.Name || + c.Id.ToString().ToUpper().StartsWith(oldCt.Id.ToString().ToUpper())) == 0) + newContentTypeOrder.Add(oldCt); + } + + if (newContentTypeOrder.Count() > 0) + folder.UniqueContentTypeOrder = newContentTypeOrder; + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = folder, + ObjectType = typeof(SPFolder), + ObjectDefinition = contentTypeOrderDefinition, + ModelHost = modelHost + }); + + folder.Update(); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/EventReceiverModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/EventReceiverModelHandler.cs index 5e5d859b0..de34500d2 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/EventReceiverModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/EventReceiverModelHandler.cs @@ -1,157 +1,159 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using SPMeta2.Common; -using SPMeta2.Definitions; -using SPMeta2.Exceptions; -using SPMeta2.SSOM.ModelHosts; -using SPMeta2.Utils; -using Microsoft.SharePoint; - -namespace SPMeta2.SSOM.ModelHandlers -{ - public class EventReceiverModelHandler : SSOMModelHandlerBase - { - #region properties - - public override Type TargetType - { - get { return typeof(EventReceiverDefinition); } - } - - #endregion - - #region methods - - public override void DeployModel(object modelHost, DefinitionBase model) - { - var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - - if (modelHost is ListModelHost) - DeployListEventReceiver(modelHost, modelHost as ListModelHost, definition); - else if (modelHost is WebModelHost) - DeployWebEventReceiver(modelHost, modelHost as WebModelHost, definition); - else if (modelHost is SiteModelHost) - DeploySiteEventReceiver(modelHost, modelHost as SiteModelHost, definition); - else if (modelHost is SPContentType) - DeployContentTypeEventReceiver(modelHost, modelHost as SPContentType, definition); - else - { - throw new SPMeta2UnsupportedModelHostException("model host should be ListModelHost/WebModelHost/SiteModelHost"); - } - } - - private void DeployContentTypeEventReceiver(object modelHost, SPContentType contentType, EventReceiverDefinition definition) - { - DeployEventReceiver(modelHost, contentType.EventReceivers, definition); - } - - private void DeploySiteEventReceiver(object modelHost, SiteModelHost siteModelHost, EventReceiverDefinition definition) - { - DeployEventReceiver(modelHost, siteModelHost.HostSite.EventReceivers, definition); - } - - private void DeployListEventReceiver(object modelHost, ListModelHost listModelHost, EventReceiverDefinition definition) - { - DeployEventReceiver(modelHost, listModelHost.HostList.EventReceivers, definition); - } - - private void DeployWebEventReceiver(object modelHost, WebModelHost listModelHost, EventReceiverDefinition definition) - { - DeployEventReceiver(modelHost, listModelHost.HostWeb.EventReceivers, definition); - } - - protected SPEventReceiverDefinition FindEventReceiverDefinition(SPEventReceiverDefinitionCollection receivers, EventReceiverDefinition definition) - { - var receiverName = definition.Name.ToUpper(); - - return receivers.OfType() - .FirstOrDefault(r => - !string.IsNullOrEmpty(r.Name) && - r.Name.ToUpper() == receiverName); - } - - protected SPEventReceiverDefinition CreateNewEventReceiverDefinition( - object modelHost, - SPEventReceiverDefinitionCollection eventReceivers, - out bool isNew) - { - var result = eventReceivers.Add(); - - isNew = true; - - if (modelHost is WebModelHost) - result.HostType = SPEventHostType.Web; - else if (modelHost is ListModelHost) - result.HostType = SPEventHostType.List; - else if (modelHost is SiteModelHost) - result.HostType = SPEventHostType.Site; - else if (modelHost is SPContentType) - result.HostType = SPEventHostType.ContentType; - else - { - throw new SPMeta2UnsupportedModelHostException("model host should be ListModelHost/WebModelHost/SiteModelHost"); - } - - return result; - } - - private void DeployEventReceiver(object modelHost, SPEventReceiverDefinitionCollection eventReceivers, - EventReceiverDefinition definition) - { - var existingReceiver = FindEventReceiverDefinition(eventReceivers, definition); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioning, - Object = existingReceiver, - ObjectType = typeof(SPEventReceiverDefinition), - ObjectDefinition = definition, - ModelHost = modelHost - }); - - bool isNew = false; - - if (existingReceiver == null) - existingReceiver = CreateNewEventReceiverDefinition(modelHost, eventReceivers, out isNew); - - MapEventReceiverProperties(definition, existingReceiver, isNew); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioned, - Object = existingReceiver, - ObjectType = typeof(SPEventReceiverDefinition), - ObjectDefinition = definition, - ModelHost = modelHost - }); - - existingReceiver.Update(); - } - - private static void MapEventReceiverProperties( - EventReceiverDefinition definition, - SPEventReceiverDefinition existingReceiver, - bool isNew) - { - existingReceiver.Name = definition.Name; - existingReceiver.Data = definition.Data; - - if (isNew) - existingReceiver.Type = (SPEventReceiverType)Enum.Parse(typeof(SPEventReceiverType), definition.Type); - - existingReceiver.Assembly = definition.Assembly; - existingReceiver.Class = definition.Class; - existingReceiver.SequenceNumber = definition.SequenceNumber; - existingReceiver.Synchronization = (SPEventReceiverSynchronization)Enum.Parse(typeof(SPEventReceiverSynchronization), definition.Synchronization); - } - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using SPMeta2.Common; +using SPMeta2.Definitions; +using SPMeta2.Exceptions; +using SPMeta2.SSOM.ModelHosts; +using SPMeta2.Utils; +using Microsoft.SharePoint; + +namespace SPMeta2.SSOM.ModelHandlers +{ + public class EventReceiverModelHandler : SSOMModelHandlerBase + { + #region properties + + public override Type TargetType + { + get { return typeof(EventReceiverDefinition); } + } + + #endregion + + #region methods + + public override void DeployModel(object modelHost, DefinitionBase model) + { + var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + if (modelHost is ListModelHost) + DeployListEventReceiver(modelHost, modelHost as ListModelHost, definition); + else if (modelHost is WebModelHost) + DeployWebEventReceiver(modelHost, modelHost as WebModelHost, definition); + else if (modelHost is SiteModelHost) + DeploySiteEventReceiver(modelHost, modelHost as SiteModelHost, definition); + else if (modelHost is ContentTypeModelHost) + DeployContentTypeEventReceiver(modelHost, (modelHost as ContentTypeModelHost).HostContentType, definition); + else if (modelHost is SPContentType) + DeployContentTypeEventReceiver(modelHost, modelHost as SPContentType, definition); + else + { + throw new SPMeta2Exception("model host should be ListModelHost/WebModelHost/SiteModelHost"); + } + } + + private void DeployContentTypeEventReceiver(object modelHost, SPContentType contentType, EventReceiverDefinition definition) + { + DeployEventReceiver(modelHost, contentType.EventReceivers, definition); + } + + private void DeploySiteEventReceiver(object modelHost, SiteModelHost siteModelHost, EventReceiverDefinition definition) + { + DeployEventReceiver(modelHost, siteModelHost.HostSite.EventReceivers, definition); + } + + private void DeployListEventReceiver(object modelHost, ListModelHost listModelHost, EventReceiverDefinition definition) + { + DeployEventReceiver(modelHost, listModelHost.HostList.EventReceivers, definition); + } + + private void DeployWebEventReceiver(object modelHost, WebModelHost listModelHost, EventReceiverDefinition definition) + { + DeployEventReceiver(modelHost, listModelHost.HostWeb.EventReceivers, definition); + } + + protected SPEventReceiverDefinition FindEventReceiverDefinition(SPEventReceiverDefinitionCollection receivers, EventReceiverDefinition definition) + { + var receiverName = definition.Name.ToUpper(); + + return receivers.OfType() + .FirstOrDefault(r => + !string.IsNullOrEmpty(r.Name) && + r.Name.ToUpper() == receiverName); + } + + protected SPEventReceiverDefinition CreateNewEventReceiverDefinition( + object modelHost, + SPEventReceiverDefinitionCollection eventReceivers, + out bool isNew) + { + var result = eventReceivers.Add(); + + isNew = true; + + if (modelHost is WebModelHost) + result.HostType = SPEventHostType.Web; + else if (modelHost is ListModelHost) + result.HostType = SPEventHostType.List; + else if (modelHost is SiteModelHost) + result.HostType = SPEventHostType.Site; + else if (modelHost is SPContentType) + result.HostType = SPEventHostType.ContentType; + else + { + throw new SPMeta2UnsupportedModelHostException("model host should be ListModelHost/WebModelHost/SiteModelHost"); + } + + return result; + } + + private void DeployEventReceiver(object modelHost, SPEventReceiverDefinitionCollection eventReceivers, + EventReceiverDefinition definition) + { + var existingReceiver = FindEventReceiverDefinition(eventReceivers, definition); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = existingReceiver, + ObjectType = typeof(SPEventReceiverDefinition), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + bool isNew = false; + + if (existingReceiver == null) + existingReceiver = CreateNewEventReceiverDefinition(modelHost, eventReceivers, out isNew); + + MapEventReceiverProperties(definition, existingReceiver, isNew); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = existingReceiver, + ObjectType = typeof(SPEventReceiverDefinition), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + existingReceiver.Update(); + } + + private static void MapEventReceiverProperties( + EventReceiverDefinition definition, + SPEventReceiverDefinition existingReceiver, + bool isNew) + { + existingReceiver.Name = definition.Name; + existingReceiver.Data = definition.Data; + + if (isNew) + existingReceiver.Type = (SPEventReceiverType)Enum.Parse(typeof(SPEventReceiverType), definition.Type); + + existingReceiver.Assembly = definition.Assembly; + existingReceiver.Class = definition.Class; + existingReceiver.SequenceNumber = definition.SequenceNumber; + existingReceiver.Synchronization = (SPEventReceiverSynchronization)Enum.Parse(typeof(SPEventReceiverSynchronization), definition.Synchronization); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/FarmSolutionModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/FarmSolutionModelHandler.cs index fbed68775..4d59c7701 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/FarmSolutionModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/FarmSolutionModelHandler.cs @@ -14,6 +14,8 @@ using SPMeta2.Utils; using System.Threading; using SPMeta2.Extensions; +using SPMeta2.Exceptions; +using System.Collections.ObjectModel; namespace SPMeta2.SSOM.ModelHandlers { @@ -53,13 +55,34 @@ public override Type TargetType public override void DeployModel(object modelHost, DefinitionBase model) { - var farmModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + SPFarm farm = null; + SPWebApplication webApp = null; + + if (modelHost is WebApplicationModelHost) + { + farm = (modelHost as WebApplicationModelHost).HostWebApplication.Farm; + webApp = (modelHost as WebApplicationModelHost).HostWebApplication; + } + else if (modelHost is FarmModelHost) + { + farm = (modelHost as FarmModelHost).HostFarm; + webApp = null; + } + else + { + throw new SPMeta2Exception( + string.Format("Unsupported model host type:[{0}]", modelHost.GetType())); + } + var solutionModel = model.WithAssertAndCast("model", value => value.RequireNotNull()); - DeploySolutionDefinition(farmModelHost, solutionModel); + DeploySolutionDefinition(modelHost, farm, webApp, solutionModel); } - protected SPSolution FindExistingSolution(FarmModelHost modelHost, FarmSolutionDefinition definition) + protected SPSolution FindExistingSolution(object modelHost, + SPFarm farm, + SPWebApplication webApplication, + FarmSolutionDefinition definition) { TraceService.VerboseFormat((int)LogEventId.ModelProvisionCoreCall, "Resolving farm solution by SolutionId: [{0}] and Name: [{1}]", @@ -69,8 +92,6 @@ protected SPSolution FindExistingSolution(FarmModelHost modelHost, FarmSolutionD definition.FileName }); - var farm = modelHost.HostFarm; - // always get anew instance of the farm // that would refresh the .Solution colleciton with the right state of the solutions farm = SPFarm.Local; @@ -80,10 +101,12 @@ protected SPSolution FindExistingSolution(FarmModelHost modelHost, FarmSolutionD definition.SolutionId != Guid.Empty && s.SolutionId == definition.SolutionId); } - private void DeploySolutionDefinition(FarmModelHost modelHost, FarmSolutionDefinition definition) + private void DeploySolutionDefinition(object modelHost, + SPFarm farm, + SPWebApplication webApplication, + FarmSolutionDefinition definition) { - var farm = modelHost.HostFarm; - var existingSolution = FindExistingSolution(modelHost, definition); + var existingSolution = FindExistingSolution(modelHost, farm, webApplication, definition); InvokeOnModelEvent(this, new ModelEventArgs { @@ -99,8 +122,8 @@ private void DeploySolutionDefinition(FarmModelHost modelHost, FarmSolutionDefin // should retract? if (existingSolution != null && definition.ShouldRetract == true) { - RetractSolution(modelHost, definition, existingSolution); - existingSolution = FindExistingSolution(modelHost, definition); + RetractSolution(modelHost, farm, webApplication, definition, existingSolution); + existingSolution = FindExistingSolution(modelHost, farm, webApplication, definition); } else if (existingSolution == null && definition.ShouldRetract == true) { @@ -113,26 +136,26 @@ private void DeploySolutionDefinition(FarmModelHost modelHost, FarmSolutionDefin // should delete? if (existingSolution != null && definition.ShouldDelete == true) { - DeleteSolution(modelHost, definition, existingSolution); - existingSolution = FindExistingSolution(modelHost, definition); + DeleteSolution(modelHost, farm, webApplication, definition, existingSolution); + existingSolution = FindExistingSolution(modelHost, farm, webApplication, definition); } // should add? if (definition.ShouldAdd == true) { // add solution to the farm - existingSolution = AddSolution(modelHost, definition); + existingSolution = AddSolution(modelHost, farm, webApplication, definition); } if (existingSolution != null && definition.ShouldUpgrade == true) { // should upgrade? - UpgradeSolution(modelHost, definition, existingSolution); + UpgradeSolution(modelHost, farm, webApplication, definition, existingSolution); } else if (existingSolution != null && definition.ShouldDeploy == true) { // should deploy? - DeploySolution(modelHost, definition, existingSolution); + DeploySolution(modelHost, farm, webApplication, definition, existingSolution); } InvokeOnModelEvent(this, new ModelEventArgs @@ -147,11 +170,22 @@ private void DeploySolutionDefinition(FarmModelHost modelHost, FarmSolutionDefin }); } - protected virtual void DeploySolution(FarmModelHost modelHost, FarmSolutionDefinition definition, SPSolution existingSolution) + protected virtual void DeploySolution(object modelHost, + SPFarm farm, + SPWebApplication webApplication, + FarmSolutionDefinition definition, + SPSolution existingSolution) { definition.SetPropertyBagValue("HadDeploymentHit"); - if (!existingSolution.Deployed) + var webAppCollection = new Collection(); + + if (webApplication != null) + webAppCollection.Add(webApplication); + + // either not deploed or not deployed to a particular web app + if (!existingSolution.Deployed || + (webAppCollection.Any() && !existingSolution.DeployedWebApplications.Contains(webAppCollection.First()))) { TraceService.Information((int)LogEventId.CoreCalls, string.Format("Deploying farm solution:[{0}]", existingSolution.Name)); @@ -159,19 +193,45 @@ protected virtual void DeploySolution(FarmModelHost modelHost, FarmSolutionDefin if (definition.DeploymentDate.HasValue) { - TraceService.Information((int)LogEventId.CoreCalls, string.Format("Deploying solution on date [{0}]", definition.DeploymentDate.Value)); - existingSolution.Deploy(definition.DeploymentDate.Value, - definition.DeploymentGlobalInstallWPPackDlls, - definition.DeploymentForce); + if (webAppCollection.Any()) + { + TraceService.Information((int)LogEventId.CoreCalls, string.Format("Deploying solution to web app on date [{0}]", definition.DeploymentDate.Value)); + + + existingSolution.Deploy(definition.DeploymentDate.Value, + definition.DeploymentGlobalInstallWPPackDlls, + webAppCollection, + definition.DeploymentForce); + } + else + { + TraceService.Information((int)LogEventId.CoreCalls, string.Format("Deploying solution globally on date [{0}]", definition.DeploymentDate.Value)); + + existingSolution.Deploy(definition.DeploymentDate.Value, + definition.DeploymentGlobalInstallWPPackDlls, + definition.DeploymentForce); + } } else { - TraceService.Information((int)LogEventId.CoreCalls, string.Format("Deploying solution NOW.")); + if (webAppCollection.Any()) + { + TraceService.Information((int)LogEventId.CoreCalls, string.Format("Deploying solution to web app NOW.")); - existingSolution.Deploy(DateTime.Now, - definition.DeploymentGlobalInstallWPPackDlls, - definition.DeploymentForce); + existingSolution.Deploy(DateTime.Now, + definition.DeploymentGlobalInstallWPPackDlls, + webAppCollection, + definition.DeploymentForce); + } + else + { + TraceService.Information((int)LogEventId.CoreCalls, string.Format("Deploying solution globaly NOW.")); + + existingSolution.Deploy(DateTime.Now, + definition.DeploymentGlobalInstallWPPackDlls, + definition.DeploymentForce); + } isNowDeployment = true; } @@ -192,7 +252,7 @@ protected virtual void DeploySolution(FarmModelHost modelHost, FarmSolutionDefin string.Format("Checkin .Deployed for solution [{0}] in [{1}] milliseconds...", existingSolution.Name, SolutionDeploymentTimeoutInMillisecond)); - existingSolution = FindExistingSolution(modelHost, definition); + existingSolution = FindExistingSolution(modelHost, farm, webApplication, definition); deployed = existingSolution.DeploymentState != SPSolutionDeploymentState.NotDeployed; } @@ -210,7 +270,7 @@ protected virtual void DeploySolution(FarmModelHost modelHost, FarmSolutionDefin string.Format("Checkin .JobExists for solution [{0}] in [{1}] milliseconds...", existingSolution.Name, SolutionDeploymentTimeoutInMillisecond)); - existingSolution = FindExistingSolution(modelHost, definition); + existingSolution = FindExistingSolution(modelHost, farm, webApplication, definition); jobExists = existingSolution.JobExists; } @@ -223,17 +283,28 @@ protected virtual void DeploySolution(FarmModelHost modelHost, FarmSolutionDefin } else { - TraceService.Information((int)LogEventId.CoreCalls, string.Format("Farm solution:[{0}] was already deployed.", existingSolution.Name)); + if (webAppCollection.Any()) + { + TraceService.Information((int)LogEventId.CoreCalls, string.Format("Farm solution:[{0}] was already deployed to web app", existingSolution.Name)); + } + else + { + TraceService.Information((int)LogEventId.CoreCalls, string.Format("Farm solution:[{0}] was already deployed.", existingSolution.Name)); + } } } - protected virtual void UpgradeSolution(FarmModelHost modelHost, FarmSolutionDefinition definition, SPSolution existingSolution) + protected virtual void UpgradeSolution(object modelHost, + SPFarm farm, + SPWebApplication webApplication, + FarmSolutionDefinition definition, + SPSolution existingSolution) { definition.SetPropertyBagValue("HadUpgradetHit"); // ensure deployment state first TraceService.Information((int)LogEventId.CoreCalls, string.Format("Ensuring deployment state. Solution must be deployed before upgrading.")); - DeploySolution(modelHost, definition, existingSolution); + DeploySolution(modelHost, farm, webApplication, definition, existingSolution); // upgrade var tmpWspDirectory = string.Format("{0}_{1}", Path.GetFileNameWithoutExtension(definition.FileName), Guid.NewGuid().ToString("N")); @@ -272,11 +343,11 @@ protected virtual void UpgradeSolution(FarmModelHost modelHost, FarmSolutionDefi string.Format("Checkin .Deployed for solution [{0}] in [{1}] milliseconds...", existingSolution.Name, SolutionDeploymentTimeoutInMillisecond)); - existingSolution = FindExistingSolution(modelHost, definition); + existingSolution = FindExistingSolution(modelHost, farm, webApplication, definition); deployed = existingSolution.DeploymentState != SPSolutionDeploymentState.NotDeployed; } - existingSolution = FindExistingSolution(modelHost, definition); + existingSolution = FindExistingSolution(modelHost, farm, webApplication, definition); TraceService.Information((int)LogEventId.CoreCalls, string.Format("Checking .Deployed status to be false")); var jobExists = existingSolution.JobExists; @@ -291,7 +362,7 @@ protected virtual void UpgradeSolution(FarmModelHost modelHost, FarmSolutionDefi string.Format("Checkin .JobExists for solution [{0}] in [{1}] milliseconds...", existingSolution.Name, SolutionDeploymentTimeoutInMillisecond)); - existingSolution = FindExistingSolution(modelHost, definition); + existingSolution = FindExistingSolution(modelHost, farm, webApplication, definition); jobExists = existingSolution.JobExists; } @@ -303,7 +374,11 @@ protected virtual void UpgradeSolution(FarmModelHost modelHost, FarmSolutionDefi } } - protected virtual void DeleteSolution(FarmModelHost modelHost, FarmSolutionDefinition definition, SPSolution existingSolution) + protected virtual void DeleteSolution(object modelHost, + SPFarm farm, + SPWebApplication webApplication, + FarmSolutionDefinition definition, + SPSolution existingSolution) { if (IsQARun) definition.SetPropertyBagValue("HadDeleteHit"); @@ -312,8 +387,18 @@ protected virtual void DeleteSolution(FarmModelHost modelHost, FarmSolutionDefin existingSolution.Delete(); } - protected virtual void RetractSolution(FarmModelHost modelHost, FarmSolutionDefinition definition, SPSolution existingSolution) + protected virtual void RetractSolution( + object modelHost, + SPFarm farm, + SPWebApplication webApplication, + FarmSolutionDefinition definition, + SPSolution existingSolution) { + var webAppCollection = new Collection(); + + if (webApplication != null) + webAppCollection.Add(webApplication); + if (IsQARun) definition.SetPropertyBagValue("HadRetractHit"); @@ -322,25 +407,57 @@ protected virtual void RetractSolution(FarmModelHost modelHost, FarmSolutionDefi if (existingSolution.Deployed) { var retracted = existingSolution.DeploymentState == SPSolutionDeploymentState.NotDeployed; - existingSolution.Retract(DateTime.Now); + + if (webAppCollection.Any()) + { + TraceService.Information((int)LogEventId.CoreCalls, string.Format("Retracting solution from web application [{0}]", existingSolution.Name)); + existingSolution.Retract(DateTime.Now, webAppCollection); + } + else + { + TraceService.Information((int)LogEventId.CoreCalls, string.Format("Retracting solution from the farm [{0}]", existingSolution.Name)); + existingSolution.Retract(DateTime.Now); + } TraceService.Information((int)LogEventId.CoreCalls, string.Format("Checking .Deployed status to be false")); - while (!retracted) + if (webAppCollection.Any()) { - TraceService.Information((int)LogEventId.CoreCalls, - string.Format("Sleeping [{0}] milliseconds...", SolutionDeploymentTimeoutInMillisecond)); - Thread.Sleep(SolutionDeploymentTimeoutInMillisecond); + // this is bad but we don't expext more than one web app here + var webApp = webAppCollection.First(); - TraceService.Information((int)LogEventId.CoreCalls, - string.Format("Checkin .Deployed for solution [{0}] in [{1}] milliseconds...", - existingSolution.Name, SolutionDeploymentTimeoutInMillisecond)); + while (existingSolution.DeployedWebApplications.Contains(webApp)) + { + TraceService.Information((int)LogEventId.CoreCalls, + string.Format("Sleeping [{0}] milliseconds...", SolutionDeploymentTimeoutInMillisecond)); + Thread.Sleep(SolutionDeploymentTimeoutInMillisecond); - existingSolution = FindExistingSolution(modelHost, definition); - retracted = existingSolution.DeploymentState == SPSolutionDeploymentState.NotDeployed; + TraceService.Information((int)LogEventId.CoreCalls, + string.Format("Checkin .Deployed for solution [{0}] in [{1}] milliseconds...", + existingSolution.Name, SolutionDeploymentTimeoutInMillisecond)); + + existingSolution = FindExistingSolution(modelHost, farm, webApplication, definition); + retracted = existingSolution.DeploymentState == SPSolutionDeploymentState.NotDeployed; + } } + else + { + while (!retracted) + { + TraceService.Information((int)LogEventId.CoreCalls, + string.Format("Sleeping [{0}] milliseconds...", SolutionDeploymentTimeoutInMillisecond)); + Thread.Sleep(SolutionDeploymentTimeoutInMillisecond); - existingSolution = FindExistingSolution(modelHost, definition); + TraceService.Information((int)LogEventId.CoreCalls, + string.Format("Checkin .Deployed for solution [{0}] in [{1}] milliseconds...", + existingSolution.Name, SolutionDeploymentTimeoutInMillisecond)); + + existingSolution = FindExistingSolution(modelHost, farm, webApplication, definition); + retracted = existingSolution.DeploymentState == SPSolutionDeploymentState.NotDeployed; + } + } + + existingSolution = FindExistingSolution(modelHost, farm, webApplication, definition); TraceService.Information((int)LogEventId.CoreCalls, string.Format("Checking .JobExists status to be false")); var jobExists = existingSolution.JobExists; @@ -356,11 +473,11 @@ protected virtual void RetractSolution(FarmModelHost modelHost, FarmSolutionDefi string.Format("Checkin .JobExists for solution [{0}] in [{1}] milliseconds...", existingSolution.Name, SolutionDeploymentTimeoutInMillisecond)); - existingSolution = FindExistingSolution(modelHost, definition); + existingSolution = FindExistingSolution(modelHost, farm, webApplication, definition); jobExists = existingSolution.JobExists; } - existingSolution = FindExistingSolution(modelHost, definition); + existingSolution = FindExistingSolution(modelHost, farm, webApplication, definition); TraceService.Information((int)LogEventId.CoreCalls, string.Format(".Deployed and .JobExists are false")); } @@ -370,16 +487,18 @@ protected virtual void RetractSolution(FarmModelHost modelHost, FarmSolutionDefi } } - protected virtual SPSolution AddSolution(FarmModelHost modelHost, FarmSolutionDefinition definition) + protected virtual SPSolution AddSolution( + object modelHost, + SPFarm farm, + SPWebApplication webApplication, + FarmSolutionDefinition definition) { if (IsQARun) definition.SetPropertyBagValue("HadAddHit"); TraceService.Information((int)LogEventId.CoreCalls, string.Format("Adding solution [{0}]", definition.FileName)); - var farm = modelHost.HostFarm; - - var existringSolution = FindExistingSolution(modelHost, definition); + var existringSolution = FindExistingSolution(modelHost, farm, webApplication, definition); var tmpWspDirectory = string.Format("{0}_{1}", Path.GetFileNameWithoutExtension(definition.FileName), Guid.NewGuid().ToString("N")); var tmpWspDirectoryPath = Path.Combine(Path.GetTempPath(), tmpWspDirectory); diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/FieldModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/FieldModelHandler.cs index 7bd709c23..f48cac493 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/FieldModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/FieldModelHandler.cs @@ -409,6 +409,9 @@ protected virtual void ProcessFieldProperties(SPField field, FieldDefinition def field.Required = definition.Required; + if (definition.ReadOnlyField.HasValue) + field.ReadOnlyField = definition.ReadOnlyField.Value; + if (!string.IsNullOrEmpty(definition.StaticName)) field.StaticName = definition.StaticName; diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/Fields/LookupFieldModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/Fields/LookupFieldModelHandler.cs index b8bf1abbf..f0c9dd775 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/Fields/LookupFieldModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/Fields/LookupFieldModelHandler.cs @@ -7,6 +7,7 @@ using SPMeta2.Utils; using Microsoft.SharePoint.Utilities; using SPMeta2.Services; +using SPMeta2.SSOM.ModelHosts; namespace SPMeta2.SSOM.ModelHandlers.Fields { @@ -117,10 +118,21 @@ public SPWeb GetTargetWeb(SPSite site, string webUrl, Guid? webId) } else if (!string.IsNullOrEmpty(webUrl)) { + // Tokens in LookupWebUrl #1013 + // https://github.com/SubPointSolutions/spmeta2/issues/1013 + + // this is a dirty hack, we know that + // passing site / web depending on the current context we are in - site or web level + + object replacementContext = site; + + if (ModelHost is WebModelHost) + replacementContext = (ModelHost as WebModelHost).HostWeb; + var targetWebUrl = TokenReplacementService.ReplaceTokens(new TokenReplacementContext { Value = webUrl, - Context = site + Context = replacementContext }).Value; // server relative URl, always diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ListModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ListModelHandler.cs index 326b066cc..724e0b589 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ListModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ListModelHandler.cs @@ -168,6 +168,9 @@ protected override void MapObject(SPList currentObject, ListDefinition definitio if (definition.NavigateForFormsPages.HasValue) list.NavigateForFormsPages = definition.NavigateForFormsPages.Value; + if (definition.EnableAssignToEmail.HasValue) + list.EnableAssignToEmail = definition.EnableAssignToEmail.Value; + #if !NET35 if (definition.IndexedRootFolderPropertyKeys.Any()) { diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ListViewModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ListViewModelHandler.cs index 8ece244ca..b48da8c85 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ListViewModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ListViewModelHandler.cs @@ -217,6 +217,9 @@ protected void ProcessView(object modelHost, SPList targetList, ListViewDefiniti private void MapProperties(SPList targetList, SPView currentView, ListViewDefinition listViewModel) { + if (listViewModel.MobileDefaultView.HasValue) + currentView.MobileDefaultView = listViewModel.MobileDefaultView.Value; + // if any fields specified, overwrite if (listViewModel.Fields.Any()) { diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ModuleFileModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ModuleFileModelHandler.cs index f26623d57..7f0da6935 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/ModuleFileModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/ModuleFileModelHandler.cs @@ -208,10 +208,16 @@ private void ProcessWebModuleFile(FolderModelHost folderHost, ModuleFileDefiniti private string GetSafeFileUrl(SPFolder folder, ModuleFileDefinition moduleFile) { + var result = moduleFile.FileName; + if (folder.ServerRelativeUrl != "/") - return folder.ServerRelativeUrl + "/" + moduleFile.FileName; + { + result = UrlUtility.CombineUrl(folder.ServerRelativeUrl, moduleFile.FileName); + } + + result = result.Replace("//", "/"); - return moduleFile.FileName; + return result; } public static void WithSafeFileOperation( diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/OfficialFileHostModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/OfficialFileHostModelHandler.cs new file mode 100644 index 000000000..74cbc129e --- /dev/null +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/OfficialFileHostModelHandler.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security; +using System.Text; +using System.Threading; + +using Microsoft.SharePoint.Administration; +using SPMeta2.Common; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; +using SPMeta2.Services; +using SPMeta2.SSOM.ModelHosts; +using SPMeta2.Utils; +using Microsoft.SharePoint; +using System.IO; + +namespace SPMeta2.SSOM.ModelHandlers +{ + public class OfficialFileHostModelHandler : SSOMModelHandlerBase + { + #region properties + + public override Type TargetType + { + get { return typeof(OfficialFileHostDefinition); } + } + + #endregion + + #region methods + + public override void DeployModel(object modelHost, DefinitionBase model) + { + var typedModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + var typedDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + DeployDefinition(modelHost, typedModelHost, typedDefinition); + } + + private void DeployDefinition(object modelHost, + WebApplicationModelHost typedModelHost, + OfficialFileHostDefinition typedDefinition) + { + var currentObject = FindExistingObject(typedModelHost.HostWebApplication, typedDefinition); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = currentObject, + ObjectType = typeof(SPOfficialFileHost), + ObjectDefinition = typedDefinition, + ModelHost = modelHost + }); + + if (currentObject == null) + { + currentObject = CreateNewObject(typedModelHost.HostWebApplication, typedDefinition); + MapObject(currentObject, typedDefinition); + } + else + { + MapObject(currentObject, typedDefinition); + } + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = currentObject, + ObjectType = typeof(SPOfficialFileHost), + ObjectDefinition = typedDefinition, + ModelHost = modelHost + }); + + typedModelHost.HostWebApplication.Update(); + } + + private void MapObject(SPOfficialFileHost currentObject, OfficialFileHostDefinition typedDefinition) + { + currentObject.OfficialFileUrl = new Uri(typedDefinition.OfficialFileUrl); + currentObject.OfficialFileName = typedDefinition.OfficialFileName; + currentObject.ShowOnSendToMenu = typedDefinition.ShowOnSendToMenu; + + if (!string.IsNullOrEmpty(typedDefinition.Explanation)) + currentObject.Explanation = typedDefinition.Explanation; + + currentObject.Action = (SPOfficialFileAction)typedDefinition.Action; + } + + private SPOfficialFileHost CreateNewObject(SPWebApplication webApp, + OfficialFileHostDefinition typedDefinition) + { + SPOfficialFileHost result = null; + + if (typedDefinition.CreateUniqueId) + result = new SPOfficialFileHost(true); + else + result = new SPOfficialFileHost(false); + + webApp.OfficialFileHosts.Add(result); + + return result; + } + + protected virtual SPOfficialFileHost FindExistingObject(SPWebApplication webApp, + OfficialFileHostDefinition definition) + { + return webApp.OfficialFileHosts + .FirstOrDefault(h => !string.IsNullOrEmpty(h.OfficialFileName) + && h.OfficialFileName.ToUpper() == definition.OfficialFileName.ToUpper()); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/SecurityRoleLinkModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/SecurityRoleLinkModelHandler.cs index ee752a63e..da60b2242 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/SecurityRoleLinkModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/SecurityRoleLinkModelHandler.cs @@ -46,6 +46,9 @@ public override void DeployModel(object modelHost, DefinitionBase model) protected SPWeb ExtractWeb(object modelHost) { if (modelHost is SPWeb) + return modelHost as SPWeb; + + if (modelHost is SPWeb) return modelHost as SPWeb; if (modelHost is SPList) diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/SuiteBarModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/SuiteBarModelHandler.cs new file mode 100644 index 000000000..70623b087 --- /dev/null +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/SuiteBarModelHandler.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security; +using System.Text; +using System.Threading; + +using Microsoft.SharePoint.Administration; +using SPMeta2.Common; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; +using SPMeta2.Services; +using SPMeta2.SSOM.ModelHosts; +using SPMeta2.Utils; +using Microsoft.SharePoint; +using System.IO; + +namespace SPMeta2.SSOM.ModelHandlers +{ + public class SuiteBarModelHandler : SSOMModelHandlerBase + { + #region properties + + public override Type TargetType + { + get { return typeof(SuiteBarDefinition); } + } + + #endregion + + #region methods + + public override void DeployModel(object modelHost, DefinitionBase model) + { + var typedModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + var typedDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + DeployDefinition(modelHost, typedModelHost, typedDefinition); + } + + private void DeployDefinition(object modelHost, + WebApplicationModelHost typedModelHost, + SuiteBarDefinition typedDefinition) + { + var currentObject = typedModelHost.HostWebApplication; + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = currentObject, + ObjectType = typeof(SPWebApplication), + ObjectDefinition = typedDefinition, + ModelHost = modelHost + }); + + MapObject(currentObject, typedDefinition); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = currentObject, + ObjectType = typeof(SPWebApplication), + ObjectDefinition = typedDefinition, + ModelHost = modelHost + }); + + typedModelHost.HostWebApplication.Update(); + } + + private void MapObject(SPWebApplication currentObject, SuiteBarDefinition typedDefinition) + { +#if !NET35 + currentObject.SuiteBarBrandingElementHtml = typedDefinition.SuiteBarBrandingElementHtml; +#endif + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/UserCustomActionModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/UserCustomActionModelHandler.cs index d73e7e69c..c0057820e 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/UserCustomActionModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/UserCustomActionModelHandler.cs @@ -112,13 +112,29 @@ private void MapCustomAction(SPUserCustomAction existringAction, UserCustomActio { TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "Updating user custom action properties."); - existringAction.Description = customAction.Description; existringAction.Group = customAction.Group; existringAction.Location = customAction.Location; existringAction.Name = customAction.Name; existringAction.ScriptBlock = customAction.ScriptBlock; - existringAction.ScriptSrc = customAction.ScriptSrc; - existringAction.Title = customAction.Title; + existringAction.ScriptSrc = customAction.ScriptSrc; + + // fallback for old models + // fill out Title/Description with Name if NULLs + // that needs for SP2016 to work well with translation exports + + // UserCustomAction without Title/Description breaks Translation Export #937 + // https://github.com/SubPointSolutions/spmeta2/issues/937 + + if (!string.IsNullOrEmpty(customAction.Title)) + existringAction.Title = customAction.Title; + else + existringAction.Title = customAction.Name; + + if (!string.IsNullOrEmpty(customAction.Description)) + existringAction.Description = customAction.Description; + else + existringAction.Description = customAction.Name; + existringAction.Url = customAction.Url; existringAction.Sequence = customAction.Sequence; diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/WebApplicationModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/WebApplicationModelHandler.cs index 8967ac9fa..c814caa53 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/WebApplicationModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/WebApplicationModelHandler.cs @@ -1,85 +1,175 @@ -using SPMeta2.Common; -using SPMeta2.Definitions; -using SPMeta2.Definitions.Base; -using SPMeta2.SSOM.ModelHosts; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using SPMeta2.Utils; -using Microsoft.SharePoint.Administration; -using System.Security; - -namespace SPMeta2.SSOM.ModelHandlers -{ - public class WebApplicationModelHandler : SSOMModelHandlerBase - { - #region properties - - public override Type TargetType - { - get { return typeof(WebApplicationDefinition); } - } - - #endregion - - #region methods - - public override void DeployModel(object modelHost, DefinitionBase model) - { - var farmModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); - var webApplicationDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - - DeployWebApplication(farmModelHost, farmModelHost.HostFarm, webApplicationDefinition); - } - - private void DeployWebApplication(FarmModelHost farmModelHost, SPFarm farm, WebApplicationDefinition webApplicationDefinition) - { - var webApps = SPWebService.ContentService.WebApplications; - - var webAppBuilder = new SPWebApplicationBuilder(farm); - - webAppBuilder.Port = webApplicationDefinition.Port; - webAppBuilder.ApplicationPoolId = webApplicationDefinition.ApplicationPoolId; - - if (!string.IsNullOrEmpty(webApplicationDefinition.ManagedAccount)) - { - webAppBuilder.IdentityType = IdentityType.SpecificUser; - - var managedAccounts = new SPFarmManagedAccountCollection(SPFarm.Local); - var maccount = managedAccounts.FindOrCreateAccount(webApplicationDefinition.ManagedAccount); - - webAppBuilder.ManagedAccount = maccount; - } - else - { - webAppBuilder.ApplicationPoolUsername = webApplicationDefinition.ApplicationPoolUsername; - - var password = new SecureString(); - - foreach (char c in webApplicationDefinition.ApplicationPoolPassword.ToCharArray()) - password.AppendChar(c); - - webAppBuilder.ApplicationPoolPassword = password; - } - - webAppBuilder.CreateNewDatabase = webApplicationDefinition.CreateNewDatabase; - - webAppBuilder.DatabaseName = webApplicationDefinition.DatabaseName; - webAppBuilder.DatabaseServer = webApplicationDefinition.DatabaseServer; - - webAppBuilder.UseNTLMExclusively = webApplicationDefinition.UseNTLMExclusively; - - webAppBuilder.HostHeader = webApplicationDefinition.HostHeader; - webAppBuilder.AllowAnonymousAccess = webApplicationDefinition.AllowAnonymousAccess; - webAppBuilder.UseSecureSocketsLayer = webApplicationDefinition.UseSecureSocketsLayer; - - var webApp = webAppBuilder.Create(); - webApp.Provision(); - } - - #endregion - - } -} +using SPMeta2.Common; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; +using SPMeta2.SSOM.ModelHosts; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using SPMeta2.Utils; +using Microsoft.SharePoint.Administration; +using System.Security; +using SPMeta2.ModelHosts; +using SPMeta2.Exceptions; + +namespace SPMeta2.SSOM.ModelHandlers +{ + public class WebApplicationModelHandler : SSOMModelHandlerBase + { + #region properties + + public override Type TargetType + { + get { return typeof(WebApplicationDefinition); } + } + + #endregion + + #region methods + + public override void DeployModel(object modelHost, DefinitionBase model) + { + var farmModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + var webApplicationDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + DeployWebApplication(farmModelHost, farmModelHost.HostFarm, webApplicationDefinition); + } + + public override void WithResolvingModelHost(ModelHostResolveContext modelHostContext) + { + var modelHost = modelHostContext.ModelHost; + var model = modelHostContext.Model; + var childModelType = modelHostContext.ChildModelType; + var action = modelHostContext.Action; + + var webApplicationDefinition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + if (modelHost is WebApplicationModelHost) + { + base.WithResolvingModelHost(modelHostContext); + return; + + } + + var farmModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + + var webApps = SPWebService.ContentService.WebApplications; + var existingWebApp = FindWebApplication(webApplicationDefinition, webApps); + + if (existingWebApp == null) + { + throw new SPMeta2Exception(string.Format( + "Cannot find web aplication by definition:[]", + webApplicationDefinition)); + } + + var webAppModelHost = ModelHostBase.Inherit(farmModelHost, h => + { + h.HostWebApplication = existingWebApp; + }); + + action(webAppModelHost); + } + + private void DeployWebApplication(FarmModelHost farmModelHost, + SPFarm farm, + WebApplicationDefinition definition) + { + var webApps = SPWebService.ContentService.WebApplications; + var existingWebApp = FindWebApplication(definition, webApps); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = existingWebApp, + ObjectType = typeof(SPWebApplication), + ObjectDefinition = definition, + ModelHost = farmModelHost + }); + + if (existingWebApp == null) + { + var webAppBuilder = new SPWebApplicationBuilder(farm); + + webAppBuilder.Port = definition.Port; + webAppBuilder.ApplicationPoolId = definition.ApplicationPoolId; + + if (!string.IsNullOrEmpty(definition.ManagedAccount)) + { + webAppBuilder.IdentityType = IdentityType.SpecificUser; + + var managedAccounts = new SPFarmManagedAccountCollection(SPFarm.Local); + var maccount = managedAccounts.FindOrCreateAccount(definition.ManagedAccount); + + webAppBuilder.ManagedAccount = maccount; + } + else + { + webAppBuilder.ApplicationPoolUsername = definition.ApplicationPoolUsername; + + var password = new SecureString(); + + foreach (char c in definition.ApplicationPoolPassword.ToCharArray()) + password.AppendChar(c); + + webAppBuilder.ApplicationPoolPassword = password; + } + + webAppBuilder.CreateNewDatabase = definition.CreateNewDatabase; + + webAppBuilder.DatabaseName = definition.DatabaseName; + webAppBuilder.DatabaseServer = definition.DatabaseServer; + + webAppBuilder.UseNTLMExclusively = definition.UseNTLMExclusively; + + webAppBuilder.HostHeader = definition.HostHeader; + webAppBuilder.AllowAnonymousAccess = definition.AllowAnonymousAccess; + webAppBuilder.UseSecureSocketsLayer = definition.UseSecureSocketsLayer; + + var webApp = webAppBuilder.Create(); + webApp.Provision(); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = webApp, + ObjectType = typeof(SPWebApplication), + ObjectDefinition = definition, + ModelHost = farmModelHost + }); + } + else + { + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = existingWebApp, + ObjectType = typeof(SPWebApplication), + ObjectDefinition = definition, + ModelHost = farmModelHost + }); + } + } + + private static SPWebApplication FindWebApplication(WebApplicationDefinition definition, SPWebApplicationCollection webApps) + { + var existingWebApp = webApps.FirstOrDefault(w => + { + var webAppUri = w.GetResponseUri(SPUrlZone.Default); + + return webAppUri.Port == definition.Port; + }); + return existingWebApp; + } + + #endregion + + } +} diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/WebPartModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/WebPartModelHandler.cs index 611acc575..bdc551297 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/WebPartModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/WebPartModelHandler.cs @@ -109,6 +109,9 @@ protected virtual void ProcessWebpartProperties(WebPart instance, WebPartDefinit if (!string.IsNullOrEmpty(definition.AuthorizationFilter)) instance.AuthorizationFilter = definition.AuthorizationFilter; + + if (definition.Hidden.HasValue) + instance.Hidden = definition.Hidden.Value; } protected virtual void ProcessWebpartCustomProperties(WebPart instance, WebPartDefinition definition) diff --git a/SPMeta2/SPMeta2.SSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.SSOM/Properties/AssemblyInfo.cs index 0d47e1bc1..428ebb59d 100644 --- a/SPMeta2/SPMeta2.SSOM/Properties/AssemblyInfo.cs +++ b/SPMeta2/SPMeta2.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.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2.SSOM/SPMeta2.SSOM.csproj b/SPMeta2/SPMeta2.SSOM/SPMeta2.SSOM.csproj index 8b1438855..4b5ac7662 100644 --- a/SPMeta2/SPMeta2.SSOM/SPMeta2.SSOM.csproj +++ b/SPMeta2/SPMeta2.SSOM/SPMeta2.SSOM.csproj @@ -200,6 +200,8 @@ + + diff --git a/SPMeta2/SPMeta2.SSOM/Services/SSOMProvisionService.cs b/SPMeta2/SPMeta2.SSOM/Services/SSOMProvisionService.cs index c8f84a63b..745f3e3b5 100644 --- a/SPMeta2/SPMeta2.SSOM/Services/SSOMProvisionService.cs +++ b/SPMeta2/SPMeta2.SSOM/Services/SSOMProvisionService.cs @@ -10,6 +10,7 @@ using System; using System.Reflection; using SPMeta2.SSOM.Services.Impl; +using SPMeta2.Common; namespace SPMeta2.SSOM.Services { @@ -110,4 +111,63 @@ public static void DeployListModel(this SSOMProvisionService modelHost, SPList l modelHost.DeployModel(listHost, model); } } + + public static class SSOMProvisionServiceIncrementalExtensions + { + /// + /// A shortcut for incremental provision + /// Sets incremental provision mode with AutoDetectSharePointPersistenceStorage = true + /// Once done, reverts back to default provision mode + /// + public static void DeploySiteModelIncrementally(this SSOMProvisionService modelHost, + SPSite site, + ModelNode model, + string incrementalModelId) + { + DeploySiteModelIncrementally(modelHost, site, model, incrementalModelId, null); + } + + /// + /// A shortcut for incremental provision + /// Sets incremental provision mode with IncrementalProvisionConfig.AutoDetectSharePointPersistenceStorage = true + /// Once done, reverts back to default provision mode + /// Callback on IncrementalProvisionConfig makes it easy to configure IncrementalProvisionConfig instance + /// + public static void DeploySiteModelIncrementally(this SSOMProvisionService modelHost, + SPSite site, + ModelNode model, + string incrementalModelId, + Action config) + { + modelHost.DeployModelIncrementally(SiteModelHost.FromSite(site), model, incrementalModelId); + } + + /// + /// A shortcut for incremental provision + /// Sets incremental provision mode with AutoDetectSharePointPersistenceStorage = true + /// Once done, reverts back to default provision mode + /// + public static void DeployWebModelIncrementally(this SSOMProvisionService modelHost, + SPWeb web, + ModelNode model, + string incrementalModelId) + { + DeployWebModelIncrementally(modelHost, web, model, incrementalModelId, null); + } + + /// + /// A shortcut for incremental provision + /// Sets incremental provision mode with IncrementalProvisionConfig.AutoDetectSharePointPersistenceStorage = true + /// Once done, reverts back to default provision mode + /// Callback on IncrementalProvisionConfig makes it easy to configure IncrementalProvisionConfig instance + /// + public static void DeployWebModelIncrementally(this SSOMProvisionService modelHost, + SPWeb web, + ModelNode model, + string incrementalModelId, + Action config) + { + modelHost.DeployModelIncrementally(WebModelHost.FromWeb(web), model, incrementalModelId, config); + } + } } diff --git a/SPMeta2/SPMeta2.SSOM/Services/SSOMTokenReplacementService.cs b/SPMeta2/SPMeta2.SSOM/Services/SSOMTokenReplacementService.cs index 8c7358d06..a1ebe321e 100644 --- a/SPMeta2/SPMeta2.SSOM/Services/SSOMTokenReplacementService.cs +++ b/SPMeta2/SPMeta2.SSOM/Services/SSOMTokenReplacementService.cs @@ -103,6 +103,10 @@ public override TokenReplacementResult ReplaceTokens(TokenReplacementContext con } } + // remove ending slash, SharePoint removes it everywhere + if (result.Value.Length > 1) + result.Value = result.Value.TrimEnd('/'); + if (OnTokenReplaced != null) { OnTokenReplaced(this, new TokenReplacementResultEventArgs @@ -123,8 +127,12 @@ private string ResolveToken(TokenReplacementContext tokenContext, object context var site = ExtractSite(contextObject); - if (site.ServerRelativeUrl == "/") - return string.Empty; + //if (site.ServerRelativeUrl == "/") + // return string.Empty; + + // Incorrect ~site/~sitecollection tokens resolve in NavigationNodes #1025 + // https://github.com/SubPointSolutions/spmeta2/issues/1025 + // always return '/' instead of empty string, further replacements would fix up double-'/' return site.ServerRelativeUrl; } @@ -138,8 +146,12 @@ private string ResolveToken(TokenReplacementContext tokenContext, object context return "/" + web.ServerRelativeUrl.Replace(web.Site.ServerRelativeUrl, string.Empty); } - if (web.ServerRelativeUrl == "/") - return string.Empty; + //if (web.ServerRelativeUrl == "/") + // return string.Empty; + + // Incorrect ~site/~sitecollection tokens resolve in NavigationNodes #1025 + // https://github.com/SubPointSolutions/spmeta2/issues/1025 + // always return '/' instead of empty string, further replacements would fix up double-'/' return web.ServerRelativeUrl; } diff --git a/SPMeta2/SPMeta2.Standard/Definitions/Fields/TaxonomyFieldDefinition.cs b/SPMeta2/SPMeta2.Standard/Definitions/Fields/TaxonomyFieldDefinition.cs index 8d983bb23..a6598a081 100644 --- a/SPMeta2/SPMeta2.Standard/Definitions/Fields/TaxonomyFieldDefinition.cs +++ b/SPMeta2/SPMeta2.Standard/Definitions/Fields/TaxonomyFieldDefinition.cs @@ -1,171 +1,176 @@ -using System; -using SPMeta2.Attributes; -using SPMeta2.Attributes.Regression; -using SPMeta2.Definitions; -using SPMeta2.Enumerations; -using SPMeta2.Utils; -using System.Runtime.Serialization; - -namespace SPMeta2.Standard.Definitions.Fields -{ - /// - /// Allows to define and deploy taxonomy field. - /// - /// - [SPObjectType(SPObjectModelType.SSOM, "Microsoft.SharePoint.Taxonomy.TaxonomyField", "Microsoft.SharePoint.Taxonomy")] - [SPObjectType(SPObjectModelType.CSOM, "Microsoft.SharePoint.Client.Taxonomy.TaxonomyField", "Microsoft.SharePoint.Client.Taxonomy")] - - [DefaultParentHost(typeof(SiteDefinition))] - [DefaultRootHost(typeof(SiteDefinition))] - - [Serializable] - [DataContract] - [ExpectArrayExtensionMethod] - - [ExpectManyInstances] - - public class TaxonomyFieldDefinition : FieldDefinition - { - #region constructors - - public TaxonomyFieldDefinition() - { - FieldType = BuiltInFieldTypes.TaxonomyFieldType; - - TermSetLCID = 1033; - TermLCID = 1033; - } - - #endregion - - #region properties - - [ExpectValidation] - [ExpectRequired] - [DataMember] - public override sealed string FieldType - { - get - { - if (IsMulti) - return BuiltInFieldTypes.TaxonomyFieldTypeMulti; - - return BuiltInFieldTypes.TaxonomyFieldType; - } - set - { - - } - } - - [ExpectValidation] - [DataMember] - public override string ValidationMessage - { - get { return string.Empty; } - set { } - } - - [ExpectValidation] - [DataMember] - public override string ValidationFormula - { - get { return string.Empty; } - set { } - } - - [ExpectValidation] - [ExpectUpdate] - [DataMember] - public bool? IsPathRendered { get; set; } - - [ExpectValidation] - [ExpectUpdate] - [DataMember] - public bool? CreateValuesInEditForm { get; set; } - - [ExpectValidation] - [ExpectUpdate] - [DataMember] - public bool? Open { get; set; } - - [ExpectValidation] - [DataMember] - public bool IsMulti { get; set; } - - [ExpectValidation] - [DataMember] - public string SspName { get; set; } - - [ExpectValidation] - [DataMember] - public Guid? SspId { get; set; } - - [ExpectValidation] - [DataMember] - public bool? UseDefaultSiteCollectionTermStore { get; set; } - - [ExpectValidation] - [DataMember] - public string TermSetName { get; set; } - - [ExpectValidation] - [DataMember] - public Guid? TermSetId { get; set; } - - [ExpectValidation] - [DataMember] - public int TermSetLCID { get; set; } - - [ExpectValidation] - [DataMember] - public string TermName { get; set; } - - [ExpectValidation] - [DataMember] - public Guid? TermId { get; set; } - - [ExpectValidation] - [DataMember] - public int TermLCID { get; set; } - - [ExpectValidation] - [DataMember] - public bool? IsSiteCollectionGroup { get; set; } - - [ExpectValidation] - [DataMember] - public string TermGroupName { get; set; } - - [ExpectValidation] - [DataMember] - public Guid? TermGroupId { get; set; } - - #endregion - - #region methods - - public override string ToString() - { - return new ToStringResult(this, base.ToString()) - - .AddPropertyValue(p => p.IsMulti) - - .AddPropertyValue(p => p.SspName) - .AddPropertyValue(p => p.SspId) - .AddPropertyValue(p => p.UseDefaultSiteCollectionTermStore) - - .AddPropertyValue(p => p.TermSetName) - .AddPropertyValue(p => p.TermSetId) - .AddPropertyValue(p => p.TermSetLCID) - - .AddPropertyValue(p => p.TermName) - .AddPropertyValue(p => p.TermId) - .AddPropertyValue(p => p.TermLCID) - - .ToString(); - } - - #endregion - } -} +using System; +using SPMeta2.Attributes; +using SPMeta2.Attributes.Regression; +using SPMeta2.Definitions; +using SPMeta2.Enumerations; +using SPMeta2.Utils; +using System.Runtime.Serialization; + +namespace SPMeta2.Standard.Definitions.Fields +{ + /// + /// Allows to define and deploy taxonomy field. + /// + /// + [SPObjectType(SPObjectModelType.SSOM, "Microsoft.SharePoint.Taxonomy.TaxonomyField", "Microsoft.SharePoint.Taxonomy")] + [SPObjectType(SPObjectModelType.CSOM, "Microsoft.SharePoint.Client.Taxonomy.TaxonomyField", "Microsoft.SharePoint.Client.Taxonomy")] + + [DefaultParentHost(typeof(SiteDefinition))] + [DefaultRootHost(typeof(SiteDefinition))] + + [Serializable] + [DataContract] + [ExpectArrayExtensionMethod] + + [ExpectManyInstances] + + public class TaxonomyFieldDefinition : FieldDefinition + { + #region constructors + + public TaxonomyFieldDefinition() + { + FieldType = BuiltInFieldTypes.TaxonomyFieldType; + + TermSetLCID = 1033; + TermLCID = 1033; + } + + #endregion + + #region properties + + [ExpectValidation] + [ExpectRequired] + [DataMember] + public override sealed string FieldType + { + get + { + if (IsMulti) + return BuiltInFieldTypes.TaxonomyFieldTypeMulti; + + return BuiltInFieldTypes.TaxonomyFieldType; + } + set + { + + } + } + + [ExpectValidation] + [DataMember] + public override string ValidationMessage + { + get { return string.Empty; } + set { } + } + + [ExpectValidation] + [DataMember] + public override string ValidationFormula + { + get { return string.Empty; } + set { } + } + + [ExpectValidation] + [ExpectUpdate] + [DataMember] + public bool? IsPathRendered { get; set; } + + [ExpectValidation] + [ExpectUpdate] + [DataMember] + public bool? CreateValuesInEditForm { get; set; } + + [ExpectValidation] + [ExpectUpdate] + [DataMember] + public bool? Open { get; set; } + + [ExpectValidation] + [DataMember] + public bool IsMulti { get; set; } + + [ExpectValidation] + [DataMember] + public string SspName { get; set; } + + [ExpectValidation] + [DataMember] + public Guid? SspId { get; set; } + + [ExpectValidation] + [DataMember] + public bool? UseDefaultSiteCollectionTermStore { get; set; } + + [ExpectValidation] + [DataMember] + public string TermSetName { get; set; } + + [ExpectValidation] + [DataMember] + public Guid? TermSetId { get; set; } + + [ExpectValidation] + [DataMember] + public int TermSetLCID { get; set; } + + [ExpectValidation] + [DataMember] + public string TermName { get; set; } + + [ExpectValidation] + [DataMember] + public Guid? TermId { get; set; } + + [ExpectValidation] + [DataMember] + public int TermLCID { get; set; } + + [ExpectValidation] + [DataMember] + public bool? IsSiteCollectionGroup { get; set; } + + [ExpectValidation] + [DataMember] + public string TermGroupName { get; set; } + + [ExpectValidation] + [DataMember] + public Guid? TermGroupId { get; set; } + + [ExpectValidation] + [DataMember] + [ExpectUpdate] + public bool? UserCreated { get; set; } + + #endregion + + #region methods + + public override string ToString() + { + return new ToStringResult(this, base.ToString()) + + .AddPropertyValue(p => p.IsMulti) + + .AddPropertyValue(p => p.SspName) + .AddPropertyValue(p => p.SspId) + .AddPropertyValue(p => p.UseDefaultSiteCollectionTermStore) + + .AddPropertyValue(p => p.TermSetName) + .AddPropertyValue(p => p.TermSetId) + .AddPropertyValue(p => p.TermSetLCID) + + .AddPropertyValue(p => p.TermName) + .AddPropertyValue(p => p.TermId) + .AddPropertyValue(p => p.TermLCID) + + .ToString(); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.Standard/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Standard/Properties/AssemblyInfo.cs index d8c8808a9..56053ddb4 100644 --- a/SPMeta2/SPMeta2.Standard/Properties/AssemblyInfo.cs +++ b/SPMeta2/SPMeta2.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.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2/Attributes/Regression/ExpectUpdate.cs b/SPMeta2/SPMeta2/Attributes/Regression/ExpectUpdate.cs index 7af883f43..03f914976 100644 --- a/SPMeta2/SPMeta2/Attributes/Regression/ExpectUpdate.cs +++ b/SPMeta2/SPMeta2/Attributes/Regression/ExpectUpdate.cs @@ -222,5 +222,4 @@ public class ExpectUpdateAsDateFormat : ExpectUpdate { } - } diff --git a/SPMeta2/SPMeta2/Common/DefaultModelWeigh.cs b/SPMeta2/SPMeta2/Common/DefaultModelWeigh.cs index fc40cfdb3..064dddf7b 100644 --- a/SPMeta2/SPMeta2/Common/DefaultModelWeigh.cs +++ b/SPMeta2/SPMeta2/Common/DefaultModelWeigh.cs @@ -134,6 +134,9 @@ private static void InitWebScope() typeof (FeatureDefinition), + // Incorrect provision order for SecurityGroup / SecurityRole #1017 + // https://github.com/SubPointSolutions/spmeta2/issues/1017 + typeof (SecurityRoleDefinition), typeof (SecurityGroupDefinition), typeof (BreakRoleInheritanceDefinition), @@ -152,7 +155,16 @@ private static void InitWebScope() typeof (SP2013WorkflowDefinition), typeof (ListDefinition), - + + // goes after list definitions to make sure you get history/task lists + typeof (SP2013WorkflowSubscriptionDefinition), + typeof (WorkflowAssociationDefinition), + + typeof (MasterPageSettingsDefinition), + typeof (WelcomePageDefinition), + + typeof (WebDefinition), + // moved navigation provision after lists // cause adding libraries would trigger 'Recent' link // https://github.com/SubPointSolutions/spmeta2/issues/865 @@ -163,13 +175,6 @@ private static void InitWebScope() typeof (QuickLaunchNavigationNodeDefinition), typeof (TopNavigationNodeDefinition), - - // goes after list definitions to make sure you get history/task lists - typeof (SP2013WorkflowSubscriptionDefinition), - typeof (WorkflowAssociationDefinition), - - typeof (MasterPageSettingsDefinition), - typeof (WelcomePageDefinition) })); } @@ -185,8 +190,10 @@ private static void InitSiteScope() typeof (PropertyDefinition), - typeof (SecurityGroupDefinition), + // Incorrect provision order for SecurityGroup / SecurityRole #1017 + // https://github.com/SubPointSolutions/spmeta2/issues/1017 typeof (SecurityRoleDefinition), + typeof (SecurityGroupDefinition), typeof (UserCustomActionDefinition), diff --git a/SPMeta2/SPMeta2/Definitions/Base/WebPartDefinitionBase.cs b/SPMeta2/SPMeta2/Definitions/Base/WebPartDefinitionBase.cs index a5d461e41..1def7b6c5 100644 --- a/SPMeta2/SPMeta2/Definitions/Base/WebPartDefinitionBase.cs +++ b/SPMeta2/SPMeta2/Definitions/Base/WebPartDefinitionBase.cs @@ -200,6 +200,11 @@ public virtual string WebpartType [ExpectValidation] public List Properties { get; set; } + [DataMember] + [ExpectValidation] + [ExpectUpdate] + public bool? Hidden { get; set; } + #endregion #region methods diff --git a/SPMeta2/SPMeta2/Definitions/ContentTypes/HideContentTypeLinksDefinition.cs b/SPMeta2/SPMeta2/Definitions/ContentTypes/HideContentTypeLinksDefinition.cs index 8ad780e7a..4d8517a9a 100644 --- a/SPMeta2/SPMeta2/Definitions/ContentTypes/HideContentTypeLinksDefinition.cs +++ b/SPMeta2/SPMeta2/Definitions/ContentTypes/HideContentTypeLinksDefinition.cs @@ -37,6 +37,7 @@ public HideContentTypeLinksDefinition() [DataMember] [IdentityKey] + [ExpectValidation] public List ContentTypes { get; set; } #endregion diff --git a/SPMeta2/SPMeta2/Definitions/ContentTypes/RemoveContentTypeLinksDefinition.cs b/SPMeta2/SPMeta2/Definitions/ContentTypes/RemoveContentTypeLinksDefinition.cs index 8721c56d6..59a9e87fc 100644 --- a/SPMeta2/SPMeta2/Definitions/ContentTypes/RemoveContentTypeLinksDefinition.cs +++ b/SPMeta2/SPMeta2/Definitions/ContentTypes/RemoveContentTypeLinksDefinition.cs @@ -37,6 +37,7 @@ public RemoveContentTypeLinksDefinition() [DataMember] [IdentityKey] + [ExpectValidation] public List ContentTypes { get; set; } #endregion diff --git a/SPMeta2/SPMeta2/Definitions/ContentTypes/UniqueContentTypeOrderDefinition.cs b/SPMeta2/SPMeta2/Definitions/ContentTypes/UniqueContentTypeOrderDefinition.cs index a0710d021..a6c5de2e6 100644 --- a/SPMeta2/SPMeta2/Definitions/ContentTypes/UniqueContentTypeOrderDefinition.cs +++ b/SPMeta2/SPMeta2/Definitions/ContentTypes/UniqueContentTypeOrderDefinition.cs @@ -68,6 +68,7 @@ public UniqueContentTypeOrderDefinition() [DataMember] [IdentityKey] + [ExpectValidation] public List ContentTypes { get; set; } #endregion diff --git a/SPMeta2/SPMeta2/Definitions/DefinitionBase.cs b/SPMeta2/SPMeta2/Definitions/DefinitionBase.cs index 74e3436b2..a59cfbfbd 100644 --- a/SPMeta2/SPMeta2/Definitions/DefinitionBase.cs +++ b/SPMeta2/SPMeta2/Definitions/DefinitionBase.cs @@ -1,78 +1,78 @@ -using System; -using System.Collections.Generic; -using System.Runtime.Serialization; -using SPMeta2.Common; - -namespace SPMeta2.Definitions -{ - [DataContract] - public class PropertyBagValue : KeyNameValue - { - public PropertyBagValue() - { - - } - - public PropertyBagValue(string name, string value) - { - Name = name; - Value = value; - } - } - - /// - /// Base definition for all SharePoint artifacts to be defined and deployed. - /// - [Serializable] - [DataContract] - public abstract class DefinitionBase : ICloneable - { - #region constructors - - protected DefinitionBase() - { - //RequireSelfProcessing = true; - PropertyBag = new List(); - } - - #endregion - - #region properties - - /// - /// A property bag to be used for any 'custom' properties attached to definition. - /// - [DataMember] - public List PropertyBag { get; set; } - - #endregion - - #region methods - - /// - /// Create a clone of the current model definition. - /// - /// - public object Clone() - { - return MemberwiseClone(); - } - - public TDefinition Clone() - where TDefinition : DefinitionBase - { - var targetType = typeof(TDefinition); - - if (GetType() != targetType - && !GetType().IsSubclassOf(targetType)) - { - throw new InvalidCastException("TDefinition should be either current class or one of the parants."); - } - return Clone() as TDefinition; - } - - #endregion - } - - -} +using System; +using System.Linq; +using System.Collections.Generic; +using System.Runtime.Serialization; +using SPMeta2.Common; +using SPMeta2.Services; + +namespace SPMeta2.Definitions +{ + [DataContract] + public class PropertyBagValue : KeyNameValue + { + public PropertyBagValue() + { + + } + + public PropertyBagValue(string name, string value) + { + Name = name; + Value = value; + } + } + + /// + /// Base definition for all SharePoint artifacts to be defined and deployed. + /// + [Serializable] + [DataContract] + public abstract class DefinitionBase : ICloneable + { + #region constructors + + protected DefinitionBase() + { + //RequireSelfProcessing = true; + PropertyBag = new List(); + } + + #endregion + + #region properties + + /// + /// A property bag to be used for any 'custom' properties attached to definition. + /// + [DataMember] + public List PropertyBag { get; set; } + + #endregion + + #region methods + + /// + /// Create a clone of the current model definition. + /// + /// + public object Clone() + { + return MemberwiseClone(); + } + + public TDefinition Clone() + where TDefinition : DefinitionBase + { + var targetType = typeof(TDefinition); + + if (GetType() != targetType + && !GetType().IsSubclassOf(targetType)) + { + throw new InvalidCastException("TDefinition should be either current class or one of the parants."); + } + return Clone() as TDefinition; + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/Definitions/FieldDefinition.cs b/SPMeta2/SPMeta2/Definitions/FieldDefinition.cs index bae26e0bb..7d773ffaa 100644 --- a/SPMeta2/SPMeta2/Definitions/FieldDefinition.cs +++ b/SPMeta2/SPMeta2/Definitions/FieldDefinition.cs @@ -300,6 +300,17 @@ public FieldDefinition() [DataMember] public virtual string ValidationMessage { get; set; } + /// + /// Gets or sets a Boolean value that specifies whether values in the field can be modified. + /// Corresponds to SPField.ReadOnlyField property + /// + [ExpectValidation] + [ExpectUpdate] + [DataMember] + + public bool? ReadOnlyField { get; set; } + + #endregion #region methods diff --git a/SPMeta2/SPMeta2/Definitions/ListDefinition.cs b/SPMeta2/SPMeta2/Definitions/ListDefinition.cs index 4686f4e5c..fcc2303ab 100644 --- a/SPMeta2/SPMeta2/Definitions/ListDefinition.cs +++ b/SPMeta2/SPMeta2/Definitions/ListDefinition.cs @@ -276,6 +276,17 @@ public ListDefinition() [DataMember] public bool? NavigateForFormsPages { get; set; } + /// + /// Represents SPList.EnableAssignToEmail property. + /// Supported only with SSOM provision + /// https://github.com/SubPointSolutions/spmeta2/issues/1023 + /// + [ExpectValidation] + [ExpectUpdate] + [DataMember] + public bool? EnableAssignToEmail { get; set; } + + #endregion #region methods diff --git a/SPMeta2/SPMeta2/Definitions/ListViewDefinition.cs b/SPMeta2/SPMeta2/Definitions/ListViewDefinition.cs index 624ef8d29..0259ed07a 100644 --- a/SPMeta2/SPMeta2/Definitions/ListViewDefinition.cs +++ b/SPMeta2/SPMeta2/Definitions/ListViewDefinition.cs @@ -156,6 +156,12 @@ public ListViewDefinition() [DataMember] public bool IsDefault { get; set; } + [ExpectValidation] + [ExpectUpdate] + [DataMember] + public bool? MobileDefaultView { get; set; } + + /// /// Gets or sets whether the list view should include parent folder item. /// diff --git a/SPMeta2/SPMeta2/Definitions/OfficialFileHostDefinition.cs b/SPMeta2/SPMeta2/Definitions/OfficialFileHostDefinition.cs new file mode 100644 index 000000000..7d9c68373 --- /dev/null +++ b/SPMeta2/SPMeta2/Definitions/OfficialFileHostDefinition.cs @@ -0,0 +1,86 @@ +using System; +using System.Runtime.Serialization; +using SPMeta2.Attributes; +using SPMeta2.Attributes.Capabilities; +using SPMeta2.Attributes.Identity; +using SPMeta2.Attributes.Regression; +using SPMeta2.Utils; +using SPMeta2.Enumerations; + +namespace SPMeta2.Definitions +{ + + /// + /// Allows to deploy SPOfficialFileHost under target web application + /// + [SPObjectType(SPObjectModelType.SSOM, "Microsoft.SharePoint.SPOfficialFileHost", "Microsoft.SharePoint")] + + [DefaultRootHost(typeof(WebApplicationDefinition))] + [DefaultParentHost(typeof(WebApplicationDefinition))] + + [Serializable] + [DataContract] + + //[ExpectWithExtensionMethod] + [ExpectArrayExtensionMethod] + + [ExpectManyInstances] + + [ParentHostCapability(typeof(WebApplicationDefinition))] + public class OfficialFileHostDefinition : DefinitionBase + { + #region properties + + [ExpectRequired] + [DataMember] + [IdentityKey] + [ExpectValidation] + public string OfficialFileName { get; set; } + + + [DataMember] + [ExpectRequired] + [ExpectUpdateAsUrl] + [ExpectValidation] + public string OfficialFileUrl { get; set; } + + + [DataMember] + [ExpectUpdate] + [ExpectValidation] + public bool ShowOnSendToMenu { get; set; } + + [DataMember] + [ExpectUpdate] + [ExpectValidation] + public string Explanation { get; set; } + + [DataMember] + [ExpectValidation] + public bool CreateUniqueId { get; set; } + + /// + /// Corresponds to SPOfficialFileHost.Action property + /// + [DataMember] + [ExpectValidation] + [ExpectUpdateAsIntRange( + MinValue = (int)OfficialFileAction.Copy, + MaxValue = (int)OfficialFileAction.Link)] + public OfficialFileAction Action { get; set; } + + #endregion + + #region methods + + public override string ToString() + { + return new ToStringResult(this) + .AddPropertyValue(p => p.OfficialFileName) + .AddPropertyValue(p => p.OfficialFileUrl) + .ToString(); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/Definitions/SuiteBarDefinition.cs b/SPMeta2/SPMeta2/Definitions/SuiteBarDefinition.cs new file mode 100644 index 000000000..3264cea84 --- /dev/null +++ b/SPMeta2/SPMeta2/Definitions/SuiteBarDefinition.cs @@ -0,0 +1,53 @@ +using System; +using System.Runtime.Serialization; +using SPMeta2.Attributes; +using SPMeta2.Attributes.Capabilities; +using SPMeta2.Attributes.Identity; +using SPMeta2.Attributes.Regression; +using SPMeta2.Utils; +using SPMeta2.Enumerations; + +namespace SPMeta2.Definitions +{ + + /// + /// Allows to deploy SPOfficialFileHost under target web application + /// + [SPObjectType(SPObjectModelType.SSOM, "Microsoft.SharePoint.Administration.SPWebApplication", "Microsoft.SharePoint")] + + [DefaultRootHost(typeof(WebApplicationDefinition))] + [DefaultParentHost(typeof(WebApplicationDefinition))] + + [Serializable] + [DataContract] + + //[ExpectWithExtensionMethod] + //[ExpectArrayExtensionMethod] + + [SingletonIdentity] + + [ParentHostCapability(typeof(WebApplicationDefinition))] + public class SuiteBarDefinition : DefinitionBase + { + #region properties + + [ExpectRequired] + [DataMember] + [IdentityKey] + [ExpectValidation] + public string SuiteBarBrandingElementHtml { get; set; } + + #endregion + + #region methods + + public override string ToString() + { + return new ToStringResult(this) + .AddPropertyValue(p => p.SuiteBarBrandingElementHtml) + .ToString(); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/Definitions/UserCustomActionDefinition.cs b/SPMeta2/SPMeta2/Definitions/UserCustomActionDefinition.cs index b26cc873f..7f02748da 100644 --- a/SPMeta2/SPMeta2/Definitions/UserCustomActionDefinition.cs +++ b/SPMeta2/SPMeta2/Definitions/UserCustomActionDefinition.cs @@ -66,7 +66,7 @@ public UserCustomActionDefinition() /// [ExpectValidation] [DataMember] - [ExpectNullable] + //[ExpectRequired] public string Title { get; set; } @@ -83,8 +83,8 @@ public UserCustomActionDefinition() /// /// [ExpectValidation] - [DataMember] - [ExpectNullable] + [DataMember] + //[ExpectRequired] public string Description { get; set; } diff --git a/SPMeta2/SPMeta2/Diagnostic/DiagnosticInfo.cs b/SPMeta2/SPMeta2/Diagnostic/DiagnosticInfo.cs index 250eae9b5..26c9117fe 100644 --- a/SPMeta2/SPMeta2/Diagnostic/DiagnosticInfo.cs +++ b/SPMeta2/SPMeta2/Diagnostic/DiagnosticInfo.cs @@ -54,7 +54,7 @@ public override string ToString() toString.AddPropertyValue(p => p.IsSSOMDetected); } - return toString.ToString(); + return toString.ToString(Environment.NewLine); } #endregion diff --git a/SPMeta2/SPMeta2/Enumerations/BuiltInFieldId.cs b/SPMeta2/SPMeta2/Enumerations/BuiltInFieldId.cs index 04d3cccac..f854cce70 100644 --- a/SPMeta2/SPMeta2/Enumerations/BuiltInFieldId.cs +++ b/SPMeta2/SPMeta2/Enumerations/BuiltInFieldId.cs @@ -447,6 +447,13 @@ public static class BuiltInFieldId public static readonly Guid XSLStyleCategory = new Guid("{dfffbbfb-0cc3-4ce7-8cb3-a2958fb726a1}"); public static readonly Guid XSLStyleIconUrl = new Guid("{3dfb3e11-9ccd-4404-b44a-a71f6399ea56}"); public static readonly Guid XSLStyleRequiredFields = new Guid("{acb9088a-a171-4b99-aa7a-10388586bc74}"); - public static readonly Guid XSLStyleWPType = new Guid("{4499086f-9ac1-41df-86c3-d8c1f8fc769a}"); + public static readonly Guid XSLStyleWPType = new Guid("{4499086f-9ac1-41df-86c3-d8c1f8fc769a}"); + + + #region manually added + + public static readonly Guid DocumentSetDescription = new Guid("{CBB92DA4-FD46-4C7D-AF6C-3128C2A5576E}"); + + #endregion } } diff --git a/SPMeta2/SPMeta2/Enumerations/BuiltInInternalFieldNames.cs b/SPMeta2/SPMeta2/Enumerations/BuiltInInternalFieldNames.cs index b307047fd..5dcd9d7f0 100644 --- a/SPMeta2/SPMeta2/Enumerations/BuiltInInternalFieldNames.cs +++ b/SPMeta2/SPMeta2/Enumerations/BuiltInInternalFieldNames.cs @@ -3503,6 +3503,12 @@ public static class BuiltInInternalFieldNames /// public static string XSLStyleWPType = "XSLStyleWPType"; + #endregion + + #region manually added + + + #endregion } } diff --git a/SPMeta2/SPMeta2/Enumerations/BuiltInOfficialFileHostAction.cs b/SPMeta2/SPMeta2/Enumerations/BuiltInOfficialFileHostAction.cs new file mode 100644 index 000000000..b58fd7a8f --- /dev/null +++ b/SPMeta2/SPMeta2/Enumerations/BuiltInOfficialFileHostAction.cs @@ -0,0 +1,14 @@ +using System; + +namespace SPMeta2.Enumerations +{ + /// + /// Reflects built-in SharePoint SPOfficialFileAction enum. + /// + public enum OfficialFileAction + { + Copy, + Move, + Link + } +} diff --git a/SPMeta2/SPMeta2/Extensions/DefinitionBaseExtensions.cs b/SPMeta2/SPMeta2/Extensions/DefinitionBaseExtensions.cs index d79be0a0c..edc124ef0 100644 --- a/SPMeta2/SPMeta2/Extensions/DefinitionBaseExtensions.cs +++ b/SPMeta2/SPMeta2/Extensions/DefinitionBaseExtensions.cs @@ -5,6 +5,7 @@ using SPMeta2.Definitions; using SPMeta2.Models; +using SPMeta2.Services; namespace SPMeta2.Extensions { @@ -63,5 +64,34 @@ public static bool HasPropertyBagValue(this DefinitionBase definition, string na } #endregion + + #region provision compatibility + + public static ModelProvisionCompatibilityResult CheckProvisionCompatibility(this DefinitionBase definition) + { + var service = ServiceContainer.Instance.GetService(); + + return service.CheckProvisionCompatibility(definition); + } + + public static bool IsCSOMCompatible(this DefinitionBase definition) + { + var compatibilityResult = CheckProvisionCompatibility(definition); + var result = compatibilityResult.Result.All(r => r.IsCSOMCompatible.HasValue + && r.IsCSOMCompatible.Value); + + return result; + } + + public static bool IsSSOMCompatible(this DefinitionBase model) + { + var compatibilityResult = CheckProvisionCompatibility(model); + var result = compatibilityResult.Result.All(r => r.IsSSOMCompatible.HasValue + && r.IsSSOMCompatible.Value); + + return result; + } + + #endregion } } diff --git a/SPMeta2/SPMeta2/Extensions/ModelNodeExtensions.cs b/SPMeta2/SPMeta2/Extensions/ModelNodeExtensions.cs index e9b978142..e0a073aac 100644 --- a/SPMeta2/SPMeta2/Extensions/ModelNodeExtensions.cs +++ b/SPMeta2/SPMeta2/Extensions/ModelNodeExtensions.cs @@ -354,6 +354,33 @@ public static WebModelNode SetIncrementalProvisionModelId(this WebModelNode mode #endregion + #region provision compatibility + public static ModelProvisionCompatibilityResult CheckProvisionCompatibility(this ModelNode modelNode) + { + var service = ServiceContainer.Instance.GetService(); + + return service.CheckProvisionCompatibility(modelNode); + } + + public static bool IsCSOMCompatible(this ModelNode modelNode) + { + var compatibilityResult = CheckProvisionCompatibility(modelNode); + var result = compatibilityResult.Result.All(r => r.IsCSOMCompatible.HasValue + && r.IsCSOMCompatible.Value); + + return result; + } + + public static bool IsSSOMCompatible(this ModelNode model) + { + var compatibilityResult = CheckProvisionCompatibility(model); + var result = compatibilityResult.Result.All(r => r.IsSSOMCompatible.HasValue + && r.IsSSOMCompatible.Value); + + return result; + } + + #endregion } } diff --git a/SPMeta2/SPMeta2/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2/Properties/AssemblyInfo.cs index 2e0b5dbfd..a1e198352 100644 --- a/SPMeta2/SPMeta2/Properties/AssemblyInfo.cs +++ b/SPMeta2/SPMeta2/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.2.17104.0417")] +[assembly: AssemblyFileVersion("1.2.17191.0958")] diff --git a/SPMeta2/SPMeta2/SPMeta2.csproj b/SPMeta2/SPMeta2/SPMeta2.csproj index f4388cb1f..330b7ee74 100644 --- a/SPMeta2/SPMeta2/SPMeta2.csproj +++ b/SPMeta2/SPMeta2/SPMeta2.csproj @@ -145,6 +145,8 @@ + + @@ -219,6 +221,7 @@ + @@ -427,6 +430,8 @@ + + @@ -497,6 +502,7 @@ + diff --git a/SPMeta2/SPMeta2/Services/Impl/DefaultModelCompatibilityService.cs b/SPMeta2/SPMeta2/Services/Impl/DefaultModelCompatibilityService.cs index 69ef86be1..06f5851b3 100644 --- a/SPMeta2/SPMeta2/Services/Impl/DefaultModelCompatibilityService.cs +++ b/SPMeta2/SPMeta2/Services/Impl/DefaultModelCompatibilityService.cs @@ -1,77 +1,113 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using SPMeta2.Attributes; -using SPMeta2.Definitions; -using SPMeta2.Extensions; -using SPMeta2.Models; - -namespace SPMeta2.Services.Impl -{ - public class DefaultModelCompatibilityService : ModelCompatibilityServiceBase - { - #region methods - public override ModelProvisionCompatibilityResult CheckProvisionCompatibility(ModelNode model) - { - var result = new ModelProvisionCompatibilityResult - { - Model = model - }; - - var modelNodes = model.Flatten(); - var rootNode = model; - - foreach (var modelNode in modelNodes) - { - var def = modelNode.Value; - var defType = def.GetType(); - - var defResult = new ModelProvisionCompatibilityResultValue(); - var attrs = (SPObjectTypeAttribute[])defType - .GetCustomAttributes(typeof(SPObjectTypeAttribute), true); - - defResult.ModelNode = modelNode; - defResult.Definition = def; - - if (attrs.Length > 0) - { - defResult.IsCSOMCompatible = attrs.Any(a => a.ObjectModelType == SPObjectModelType.CSOM); - defResult.IsSSOMCompatible = attrs.Any(a => a.ObjectModelType == SPObjectModelType.SSOM); - } - - // temporary fix for SiteDefinition, it cannot be yet provisioned with M2 CSOM - if (def.GetType() == typeof(SiteDefinition)) - { - if (modelNode.Options.RequireSelfProcessing) - { - // that's farm / web model or an attempt to provision a new site w/ M2 - defResult.IsCSOMCompatible = false; - } - else - { - // SiteModel, all valid - defResult.IsCSOMCompatible = true; - } - } - - // fixing up root definitions - // farm and web app model cannot be provisioned with M2 - if (modelNode == rootNode) - { - if (defType == typeof(FarmDefinition) - || defType == typeof(WebApplicationDefinition)) - { - defResult.IsCSOMCompatible = false; - } - } - - result.Result.Add(defResult); - } - - return result; - } - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using SPMeta2.Attributes; +using SPMeta2.Definitions; +using SPMeta2.Extensions; +using SPMeta2.Models; + +namespace SPMeta2.Services.Impl +{ + public class DefaultModelCompatibilityService : ModelCompatibilityServiceBase + { + #region methods + + public override ModelProvisionCompatibilityResult CheckProvisionCompatibility(DefinitionBase definition) + { + return CheckProvisionCompatibility(null, definition); + } + + public override ModelProvisionCompatibilityResult CheckProvisionCompatibility(ModelNode model) + { + return CheckProvisionCompatibility(model, null); + } + + protected ModelProvisionCompatibilityResult CheckProvisionCompatibility(ModelNode model, DefinitionBase definition) + { + var result = new ModelProvisionCompatibilityResult + { + Model = model + }; + + if (model != null) + { + var modelNodes = model.Flatten(); + var rootNode = model; + + foreach (var modelNode in modelNodes) + { + var def = modelNode.Value; + CheckDefinition(result, rootNode, modelNode, def); + } + } + else + { + CheckDefinition(result, null, null, definition); + } + + return result; + } + + private static void CheckDefinition(ModelProvisionCompatibilityResult result, + ModelNode rootNode, + ModelNode modelNode, + DefinitionBase def) + { + var defType = def.GetType(); + + var defResult = new ModelProvisionCompatibilityResultValue(); + var attrs = (SPObjectTypeAttribute[])defType + .GetCustomAttributes(typeof(SPObjectTypeAttribute), true); + + defResult.ModelNode = modelNode; + defResult.Definition = def; + + if (attrs.Length > 0) + { + defResult.IsCSOMCompatible = attrs.Any(a => a.ObjectModelType == SPObjectModelType.CSOM); + defResult.IsSSOMCompatible = attrs.Any(a => a.ObjectModelType == SPObjectModelType.SSOM); + } + + // temporary fix for SiteDefinition, it cannot be yet provisioned with SPMeta2 CSOM + if (def.GetType() == typeof(SiteDefinition)) + { + if (modelNode != null) + { + if (modelNode.Options.RequireSelfProcessing) + { + // that's farm / web model or an attempt to provision a new site w/ SPMeta2 + defResult.IsCSOMCompatible = false; + } + else + { + // SiteModel, all valid + defResult.IsCSOMCompatible = true; + } + } + else + { + // that's definition validation call + // but still, we don't support it yet + defResult.IsCSOMCompatible = false; + } + } + + // fixing up root definitions + // farm and web app model cannot be provisioned with SPMeta2 CSOM + // handling call from model nodes & defs + if ((modelNode == rootNode) || (modelNode == null && rootNode == null)) + { + if (defType == typeof(FarmDefinition) + || defType == typeof(WebApplicationDefinition)) + { + defResult.IsCSOMCompatible = false; + } + } + + result.Result.Add(defResult); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/Services/Impl/Validation/DefaultContentTypeLinkValidationService.cs b/SPMeta2/SPMeta2/Services/Impl/Validation/DefaultContentTypeLinkValidationService.cs index c2fa7af2b..dd84a4e37 100644 --- a/SPMeta2/SPMeta2/Services/Impl/Validation/DefaultContentTypeLinkValidationService.cs +++ b/SPMeta2/SPMeta2/Services/Impl/Validation/DefaultContentTypeLinkValidationService.cs @@ -20,96 +20,103 @@ public DefaultContentTypeLinkValidationService() } public override void DeployModel(ModelHostBase modelHost, ModelNode model) - { - Exceptions.Clear(); + { + // added support recently + // .HideContentTypeLink() should work with content type ID #1021 + // .AddUniqueContentTypeOrder() should work with content type ID #1022 + // .RemoveContentTypeLink() should work with content type ID #1020 + + return; + + //Exceptions.Clear(); + + //var exceptionMessage = "List node:[{0}] has [{1}] with ContentTypeId value:[{2}]. ContentTypeId does not work on the list scoped content type operations. Use ContentTypeName for list scoped content type operations."; + + //var allNodes = model.Flatten(); - var exceptionMessage = "List node:[{0}] has [{1}] with ContentTypeId value:[{2}]. ContentTypeId does not work on the list scoped content type operations. Use ContentTypeName for list scoped content type operations."; + ////var addContentTypes = GetParenChildNodes(allNodes); + //var hideContentTypes = GetParenChildNodes(allNodes); + //var removeContentTypes = GetParenChildNodes(allNodes); + //var uniqueContentTypes = GetParenChildNodes(allNodes); - var allNodes = model.Flatten(); + ////ValidateChildNodes(addContentTypes, (node, child) => + ////{ + //// var typedDef = child.Value as ContentTypeLinkDefinition; - //var addContentTypes = GetParenChildNodes(allNodes); - var hideContentTypes = GetParenChildNodes(allNodes); - var removeContentTypes = GetParenChildNodes(allNodes); - var uniqueContentTypes = GetParenChildNodes(allNodes); + //// if (!string.IsNullOrEmpty(typedDef.ContentTypeId)) + //// { + //// Exceptions.Add(new SPMeta2ModelValidationException( + //// string.Format(exceptionMessage, + //// new object[]{ + //// node, + //// typedDef.GetType(), + //// typedDef.ContentTypeName + //// }))); + //// } + ////}); - //ValidateChildNodes(addContentTypes, (node, child) => + //ValidateChildNodes(hideContentTypes, (node, child) => //{ - // var typedDef = child.Value as ContentTypeLinkDefinition; + // var typedDef = child.Value as HideContentTypeLinksDefinition; - // if (!string.IsNullOrEmpty(typedDef.ContentTypeId)) + // foreach (var ctLink in typedDef.ContentTypes) // { - // Exceptions.Add(new SPMeta2ModelValidationException( - // string.Format(exceptionMessage, - // new object[]{ + // if (!string.IsNullOrEmpty(ctLink.ContentTypeId)) + // { + // Exceptions.Add(new SPMeta2ModelValidationException( + // string.Format(exceptionMessage, + // new object[]{ // node, // typedDef.GetType(), - // typedDef.ContentTypeName + // ctLink.ContentTypeId // }))); + // } // } //}); - ValidateChildNodes(hideContentTypes, (node, child) => - { - var typedDef = child.Value as HideContentTypeLinksDefinition; - - foreach (var ctLink in typedDef.ContentTypes) - { - if (!string.IsNullOrEmpty(ctLink.ContentTypeId)) - { - Exceptions.Add(new SPMeta2ModelValidationException( - string.Format(exceptionMessage, - new object[]{ - node, - typedDef.GetType(), - ctLink.ContentTypeId - }))); - } - } - }); - - ValidateChildNodes(removeContentTypes, (node, child) => - { - var typedDef = child.Value as RemoveContentTypeLinksDefinition; + //ValidateChildNodes(removeContentTypes, (node, child) => + //{ + // var typedDef = child.Value as RemoveContentTypeLinksDefinition; - foreach (var ctLink in typedDef.ContentTypes) - { - if (!string.IsNullOrEmpty(ctLink.ContentTypeId)) - { - Exceptions.Add(new SPMeta2ModelValidationException( - string.Format(exceptionMessage, - new object[]{ - node, - typedDef.GetType(), - ctLink.ContentTypeId - }))); - } - } - }); + // foreach (var ctLink in typedDef.ContentTypes) + // { + // if (!string.IsNullOrEmpty(ctLink.ContentTypeId)) + // { + // Exceptions.Add(new SPMeta2ModelValidationException( + // string.Format(exceptionMessage, + // new object[]{ + // node, + // typedDef.GetType(), + // ctLink.ContentTypeId + // }))); + // } + // } + //}); - ValidateChildNodes(uniqueContentTypes, (node, child) => - { - var typedDef = child.Value as UniqueContentTypeOrderDefinition; + //ValidateChildNodes(uniqueContentTypes, (node, child) => + //{ + // var typedDef = child.Value as UniqueContentTypeOrderDefinition; - foreach (var ctLink in typedDef.ContentTypes) - { - if (!string.IsNullOrEmpty(ctLink.ContentTypeId)) - { - Exceptions.Add(new SPMeta2ModelValidationException( - string.Format(exceptionMessage, - new object[]{ - node, - typedDef.GetType(), - ctLink.ContentTypeId - }))); - } - } - }); + // foreach (var ctLink in typedDef.ContentTypes) + // { + // if (!string.IsNullOrEmpty(ctLink.ContentTypeId)) + // { + // Exceptions.Add(new SPMeta2ModelValidationException( + // string.Format(exceptionMessage, + // new object[]{ + // node, + // typedDef.GetType(), + // ctLink.ContentTypeId + // }))); + // } + // } + //}); - if (Exceptions.Count > 0) - { - throw new SPMeta2ModelDeploymentException("Errors while validating the model", - new SPMeta2AggregateException(Exceptions.OfType())); - } + //if (Exceptions.Count > 0) + //{ + // throw new SPMeta2ModelDeploymentException("Errors while validating the model", + // new SPMeta2AggregateException(Exceptions.OfType())); + //} } protected virtual void ValidateChildNodes(IEnumerable nodes, diff --git a/SPMeta2/SPMeta2/Services/ModelCompatibilityServiceBase.cs b/SPMeta2/SPMeta2/Services/ModelCompatibilityServiceBase.cs index 8be1cf104..c259c7fbf 100644 --- a/SPMeta2/SPMeta2/Services/ModelCompatibilityServiceBase.cs +++ b/SPMeta2/SPMeta2/Services/ModelCompatibilityServiceBase.cs @@ -14,7 +14,8 @@ public abstract class ModelCompatibilityServiceBase { #region methods - public abstract ModelProvisionCompatibilityResult CheckProvisionCompatibility(ModelNode model); + public abstract ModelProvisionCompatibilityResult CheckProvisionCompatibility(ModelNode model); + public abstract ModelProvisionCompatibilityResult CheckProvisionCompatibility(DefinitionBase definition); #endregion diff --git a/SPMeta2/SPMeta2/Syntax/Default/FarmDefinitionSyntax.cs b/SPMeta2/SPMeta2/Syntax/Default/FarmDefinitionSyntax.cs index 7af18e972..ee85ce83c 100644 --- a/SPMeta2/SPMeta2/Syntax/Default/FarmDefinitionSyntax.cs +++ b/SPMeta2/SPMeta2/Syntax/Default/FarmDefinitionSyntax.cs @@ -11,7 +11,8 @@ public class FarmModelNode : TypedModelNode, IFarmModelNode, IManagedPropertyHostModelNode, IFeatureHostModelNode, IWebApplicationHostModelNode, - ISecureStoreApplicationHostModelNode + ISecureStoreApplicationHostModelNode, + IFarmSolutionModelHostNode { } diff --git a/SPMeta2/SPMeta2/Syntax/Default/FarmSolutionDefinitionSyntax.cs b/SPMeta2/SPMeta2/Syntax/Default/FarmSolutionDefinitionSyntax.cs index a3c4295fd..ac541c9e4 100644 --- a/SPMeta2/SPMeta2/Syntax/Default/FarmSolutionDefinitionSyntax.cs +++ b/SPMeta2/SPMeta2/Syntax/Default/FarmSolutionDefinitionSyntax.cs @@ -17,15 +17,15 @@ public static class FarmSolutionDefinitionSyntax { #region methods - public static TModelNode AddFarmSolution(this TModelNode model, FarmSolutionDefinition definition) - where TModelNode : ModelNode, IFarmModelNode, new() + public static TModelNode AddFarmSolution(this TModelNode model, FarmSolutionDefinition definition) + where TModelNode : ModelNode, IFarmSolutionModelHostNode, new() { return AddFarmSolution(model, definition, null); } public static TModelNode AddFarmSolution(this TModelNode model, FarmSolutionDefinition definition, - Action action) - where TModelNode : ModelNode, IFarmModelNode, new() + Action action) + where TModelNode : ModelNode, IFarmSolutionModelHostNode, new() { return model.AddTypedDefinitionNode(definition, action); } @@ -34,8 +34,8 @@ public static TModelNode AddFarmSolution(this TModelNode model, Farm #region array overload - public static TModelNode AddFarmSolutions(this TModelNode model, IEnumerable definitions) - where TModelNode : ModelNode, IFarmModelNode, new() + public static TModelNode AddFarmSolutions(this TModelNode model, IEnumerable definitions) + where TModelNode : ModelNode, IFarmSolutionModelHostNode, new() { foreach (var definition in definitions) model.AddDefinitionNode(definition); diff --git a/SPMeta2/SPMeta2/Syntax/Default/Interfaces/IFarmSolutionModelHostNode.cs b/SPMeta2/SPMeta2/Syntax/Default/Interfaces/IFarmSolutionModelHostNode.cs new file mode 100644 index 000000000..bc051d380 --- /dev/null +++ b/SPMeta2/SPMeta2/Syntax/Default/Interfaces/IFarmSolutionModelHostNode.cs @@ -0,0 +1,7 @@ +namespace SPMeta2.Syntax.Default +{ + public interface IFarmSolutionModelHostNode : IModelNode + { + + } +} diff --git a/SPMeta2/SPMeta2/Syntax/Default/OfficialFileHostDefinitionSyntax.cs b/SPMeta2/SPMeta2/Syntax/Default/OfficialFileHostDefinitionSyntax.cs new file mode 100644 index 000000000..5618497f6 --- /dev/null +++ b/SPMeta2/SPMeta2/Syntax/Default/OfficialFileHostDefinitionSyntax.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using SPMeta2.Definitions; +using SPMeta2.Models; + +namespace SPMeta2.Syntax.Default +{ + [Serializable] + [DataContract] + public class OfficialFileHostModelNode : TypedModelNode + { + + } + + public static class OfficialFileHostDefinitionSyntax + { + #region methods + + public static TModelNode AddOfficialFileHost(this TModelNode model, OfficialFileHostDefinition definition) + where TModelNode : ModelNode, IWebApplicationModelNode, new() + { + return AddOfficialFileHost(model, definition, null); + } + + public static TModelNode AddOfficialFileHost(this TModelNode model, OfficialFileHostDefinition definition, + Action action) + where TModelNode : ModelNode, IWebApplicationModelNode, new() + { + return model.AddTypedDefinitionNode(definition, action); + } + + #endregion + + #region array overload + + public static TModelNode AddOfficialFileHosts(this TModelNode model, IEnumerable definitions) + where TModelNode : ModelNode, IWebApplicationModelNode, new() + { + foreach (var definition in definitions) + model.AddDefinitionNode(definition); + + return model; + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/Syntax/Default/SPMeta2Model.cs b/SPMeta2/SPMeta2/Syntax/Default/SPMeta2Model.cs index 5a45a320e..3ce3a30cb 100644 --- a/SPMeta2/SPMeta2/Syntax/Default/SPMeta2Model.cs +++ b/SPMeta2/SPMeta2/Syntax/Default/SPMeta2Model.cs @@ -477,27 +477,17 @@ private static void EnureKnownTypes(ModelNode model) public static ModelProvisionCompatibilityResult CheckProvisionCompatibility(ModelNode model) { - var service = ServiceContainer.Instance.GetService(); - - return service.CheckProvisionCompatibility(model); + return model.CheckProvisionCompatibility(); } public static bool IsCSOMCompatible(ModelNode model) { - var compatibilityResult = CheckProvisionCompatibility(model); - var result = compatibilityResult.Result.All(r => r.IsCSOMCompatible.HasValue - && r.IsCSOMCompatible.Value); - - return result; + return model.IsCSOMCompatible(); } public static bool IsSSOMCompatible(ModelNode model) { - var compatibilityResult = CheckProvisionCompatibility(model); - var result = compatibilityResult.Result.All(r => r.IsSSOMCompatible.HasValue - && r.IsSSOMCompatible.Value); - - return result; + return model.IsSSOMCompatible(); } #endregion diff --git a/SPMeta2/SPMeta2/Syntax/Default/SuiteBarDefinitionSyntax.cs b/SPMeta2/SPMeta2/Syntax/Default/SuiteBarDefinitionSyntax.cs new file mode 100644 index 000000000..fe7218167 --- /dev/null +++ b/SPMeta2/SPMeta2/Syntax/Default/SuiteBarDefinitionSyntax.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using SPMeta2.Definitions; +using SPMeta2.Models; + +namespace SPMeta2.Syntax.Default +{ + [Serializable] + [DataContract] + public class SuiteBarModelNode : TypedModelNode + { + + } + + public static class SuiteBarDefinitionSyntax + { + #region methods + + public static TModelNode AddSuiteBar(this TModelNode model, SuiteBarDefinition definition) + where TModelNode : ModelNode, IWebApplicationModelNode, new() + { + return AddSuiteBar(model, definition, null); + } + + public static TModelNode AddSuiteBar(this TModelNode model, SuiteBarDefinition definition, + Action action) + where TModelNode : ModelNode, IWebApplicationModelNode, new() + { + return model.AddTypedDefinitionNode(definition, action); + } + + #endregion + + #region array overload + + //public static TModelNode AddOfficialFileHosts(this TModelNode model, IEnumerable definitions) + // where TModelNode : ModelNode, IWebApplicationModelNode, new() + //{ + // foreach (var definition in definitions) + // model.AddDefinitionNode(definition); + + // return model; + //} + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/Syntax/Default/WebApplicationDefinitionSyntax.cs b/SPMeta2/SPMeta2/Syntax/Default/WebApplicationDefinitionSyntax.cs index a7b8e4ff8..78e9151f1 100644 --- a/SPMeta2/SPMeta2/Syntax/Default/WebApplicationDefinitionSyntax.cs +++ b/SPMeta2/SPMeta2/Syntax/Default/WebApplicationDefinitionSyntax.cs @@ -1,68 +1,69 @@ -using System; -using System.Collections.Generic; -using System.Runtime.Serialization; -using SPMeta2.Definitions; -using SPMeta2.Models; - -namespace SPMeta2.Syntax.Default -{ - [Serializable] - [DataContract] - public class WebApplicationModelNode : TypedModelNode, IWebApplicationModelNode, - IPropertyHostModelNode, - IFeatureHostModelNode, - IJobHostModelNode, - ISiteHostModelNode - { - - } - - public static class WebApplicationDefinitionSyntax - { - #region add host - - public static TModelNode AddHostWebApplication(this TModelNode model, WebApplicationDefinition definition) - where TModelNode : ModelNode, IWebApplicationHostModelNode, new() - { - return AddHostWebApplication(model, definition, null); - } - public static TModelNode AddHostWebApplication(this TModelNode model, WebApplicationDefinition definition, - Action action) - where TModelNode : ModelNode, IWebApplicationHostModelNode, new() - { - return model.AddTypedDefinitionNodeWithOptions(definition, action, ModelNodeOptions.New().NoSelfProcessing()); - } - - #endregion - - #region methods - - public static TModelNode AddWebApplication(this TModelNode model, WebApplicationDefinition definition) - where TModelNode : ModelNode, IWebApplicationHostModelNode, new() - { - return AddWebApplication(model, definition, null); - } - - public static TModelNode AddWebApplication(this TModelNode model, WebApplicationDefinition definition, - Action action) - where TModelNode : ModelNode, IWebApplicationHostModelNode, new() - { - return model.AddTypedDefinitionNode(definition, action); - } - - #endregion - - #region array overload - - public static TModelNode AddWebApplications(this TModelNode model, IEnumerable definitions) - where TModelNode : ModelNode, IWebApplicationModelNode, new() - { - foreach (var definition in definitions) - model.AddDefinitionNode(definition); - - return model; - } - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using SPMeta2.Definitions; +using SPMeta2.Models; + +namespace SPMeta2.Syntax.Default +{ + [Serializable] + [DataContract] + public class WebApplicationModelNode : TypedModelNode, IWebApplicationModelNode, + IPropertyHostModelNode, + IFeatureHostModelNode, + IJobHostModelNode, + ISiteHostModelNode, + IFarmSolutionModelHostNode + { + + } + + public static class WebApplicationDefinitionSyntax + { + #region add host + + public static TModelNode AddHostWebApplication(this TModelNode model, WebApplicationDefinition definition) + where TModelNode : ModelNode, IWebApplicationHostModelNode, new() + { + return AddHostWebApplication(model, definition, null); + } + public static TModelNode AddHostWebApplication(this TModelNode model, WebApplicationDefinition definition, + Action action) + where TModelNode : ModelNode, IWebApplicationHostModelNode, new() + { + return model.AddTypedDefinitionNodeWithOptions(definition, action, ModelNodeOptions.New().NoSelfProcessing()); + } + + #endregion + + #region methods + + public static TModelNode AddWebApplication(this TModelNode model, WebApplicationDefinition definition) + where TModelNode : ModelNode, IWebApplicationHostModelNode, new() + { + return AddWebApplication(model, definition, null); + } + + public static TModelNode AddWebApplication(this TModelNode model, WebApplicationDefinition definition, + Action action) + where TModelNode : ModelNode, IWebApplicationHostModelNode, new() + { + return model.AddTypedDefinitionNode(definition, action); + } + + #endregion + + #region array overload + + public static TModelNode AddWebApplications(this TModelNode model, IEnumerable definitions) + where TModelNode : ModelNode, IWebApplicationModelNode, new() + { + foreach (var definition in definitions) + model.AddDefinitionNode(definition); + + return model; + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/Utils/ReflectionUtils.cs b/SPMeta2/SPMeta2/Utils/ReflectionUtils.cs index 8886d8651..c712d3ff7 100644 --- a/SPMeta2/SPMeta2/Utils/ReflectionUtils.cs +++ b/SPMeta2/SPMeta2/Utils/ReflectionUtils.cs @@ -25,9 +25,17 @@ public static class ReflectionUtils #region set helpers - public static void SetNonPublicFieldValue(object obj, string fieldName, object value) + public static void SetNonPublicPropertyValue(object obj, string name, object value) { - var prop = obj.GetType().GetField(fieldName, BindingFlags.NonPublic | BindingFlags.Instance); + var prop = obj.GetType().GetProperty(name, BindingFlags.NonPublic | BindingFlags.Instance); + + if (prop != null) + prop.SetValue(obj, value, null); + } + + public static void SetNonPublicFieldValue(object obj, string name, object value) + { + var prop = obj.GetType().GetField(name, BindingFlags.NonPublic | BindingFlags.Instance); if (prop != null) prop.SetValue(obj, value); diff --git a/SPMeta2/SPMeta2/Utils/ToStringResult.cs b/SPMeta2/SPMeta2/Utils/ToStringResult.cs index e3f4d2f05..96b3214c3 100644 --- a/SPMeta2/SPMeta2/Utils/ToStringResult.cs +++ b/SPMeta2/SPMeta2/Utils/ToStringResult.cs @@ -44,6 +44,11 @@ public static ToStringResult New(TType obj) #region methods public override string ToString() + { + return ToString(" "); + } + + public string ToString(string joinSeparator) { var result = new List(); @@ -51,9 +56,9 @@ public override string ToString() result.Add(string.Format("{0}:[{1}]", key, Values[key])); if (!string.IsNullOrEmpty(InitialString)) - return InitialString + " " + string.Join(" ", result.ToArray()); + return InitialString + joinSeparator + string.Join(joinSeparator, result.ToArray()); - return string.Join(" ", result.ToArray()); + return string.Join(joinSeparator, result.ToArray()); } public ToStringResult AddPropertyValue(Expression> exp) diff --git a/SPMeta2/SPMeta2/Utils/WebpartXmlExtensions.cs b/SPMeta2/SPMeta2/Utils/WebpartXmlExtensions.cs index 032d3a8fc..9e22568b2 100644 --- a/SPMeta2/SPMeta2/Utils/WebpartXmlExtensions.cs +++ b/SPMeta2/SPMeta2/Utils/WebpartXmlExtensions.cs @@ -323,8 +323,6 @@ public static string GetListGuid(this XDocument webpartXmlDocument) return GetProperty(webpartXmlDocument, name); } - - public static string GetGroupStyle(this XDocument webpartXmlDocument) { var name = MethodBase.GetCurrentMethod().Name.Replace("Get", string.Empty); @@ -446,6 +444,16 @@ public static XDocument SetFilterValue1(this XDocument webpartXmlDocument, strin return SetOrUpdateProperty(webpartXmlDocument, name, value); } + public static XDocument SetHidden(this XDocument webpartXmlDocument, bool value) + { + if (IsV3version(webpartXmlDocument)) + return SetOrUpdateV3Property(webpartXmlDocument, "Hidden", value.ToString(), "bool", WebPartNamespaceV3, false); + if (IsV2version(webpartXmlDocument)) + return SetOrUpdateV2Property(webpartXmlDocument, "IsVisible", (!value).ToString().ToLower(), "bool", WebPartNamespaceV2, false); + + throw new Exception("http://schemas.microsoft.com/WebPart/v3 or http://schemas.microsoft.com/WebPart/v2 is expected, but missed"); + } + public static XDocument BindXsltListViewWebPartToList(this XDocument webpartXmlDocument, string listId) { return webpartXmlDocument diff --git a/SPMeta2/SubPointSolutions.Docs/Code/Samples/m2Samples.cs b/SPMeta2/SubPointSolutions.Docs/Code/Samples/m2Samples.cs index 14fe4a05d..2ced28b07 100644 --- a/SPMeta2/SubPointSolutions.Docs/Code/Samples/m2Samples.cs +++ b/SPMeta2/SubPointSolutions.Docs/Code/Samples/m2Samples.cs @@ -35,6 +35,14 @@ public static class m2Samples SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n <Description />\r\n <MethodBodyWithFunction>\r\n \r\n static void SSOMConsoleAppSample(string[] args)\r\n {\r\n var siteUrl = \"http://tesla-dev:31415/\";\r\n\r\n // define fields\r\n var clientDescriptionField = new FieldDefinition\r\n {\r\n Title = \"Client Description\",\r\n InternalName = \"dcs_ClientDescription\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"06975b67-01f5-47d7-9e2e-2702dfb8c217\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var clientNumberField = new FieldDefinition\r\n {\r\n Title = \"Client Number\",\r\n InternalName = \"dcs_ClientNumber\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"22264486-7561-45ec-a6bc-591ba243693b\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n\r\n // define content type\r\n var customerAccountContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Account\",\r\n Id = new Guid(\"ddc46a66-19a0-460b-a723-c84d7f60a342\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\",\r\n };\r\n\r\n // define relationships and the model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(clientDescriptionField)\r\n .AddField(clientNumberField)\r\n .AddContentType(customerAccountContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(clientDescriptionField)\r\n .AddContentTypeFieldLink(clientNumberField);\r\n });\r\n });\r\n\r\n using (var spSite = new SPSite(siteUrl))\r\n {\r\n // deploy the model to the SharePoint site over CSOM\r\n var ssomProvisionService = new SSOMProvisionService();\r\n ssomProvisionService.DeploySiteModel(spSite, siteModel);\r\n }\r\n }</MethodBodyWithFunction>\r\n <MethodBody>var siteUrl = \"http://tesla-dev:31415/\";\r\n\r\n// define fields\r\nvar clientDescriptionField = new FieldDefinition\r\n{\r\n Title = \"Client Description\",\r\n InternalName = \"dcs_ClientDescription\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"06975b67-01f5-47d7-9e2e-2702dfb8c217\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n};\r\n\r\nvar clientNumberField = new FieldDefinition\r\n{\r\n Title = \"Client Number\",\r\n InternalName = \"dcs_ClientNumber\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"22264486-7561-45ec-a6bc-591ba243693b\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n};\r\n\r\n\r\n// define content type\r\nvar customerAccountContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Customer Account\",\r\n Id = new Guid(\"ddc46a66-19a0-460b-a723-c84d7f60a342\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\",\r\n};\r\n\r\n// define relationships and the model\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(clientDescriptionField)\r\n .AddField(clientNumberField)\r\n .AddContentType(customerAccountContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(clientDescriptionField)\r\n .AddContentTypeFieldLink(clientNumberField);\r\n });\r\n});\r\n\r\nusing (var spSite = new SPSite(siteUrl))\r\n{\r\n // deploy the model to the SharePoint site over CSOM\r\n var ssomProvisionService = new SSOMProvisionService();\r\n ssomProvisionService.DeploySiteModel(spSite, siteModel);\r\n}\r\n\r\n</MethodBody>\r\n <Language>cs</Language>\r\n <Namespace>SPMeta2.Docs.ProvisionSamples.Provision.Definitions</Namespace>\r\n <ClassName>ConsoleApSamples</ClassName>\r\n <MethodName>SSOMConsoleAppSample</MethodName>\r\n <ClassComment />\r\n <MethodFullName>SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ConsoleApSamples.SSOMConsoleAppSample</MethodFullName>\r\n <ClassFullName>SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ConsoleApSamples</ClassFullName>\r\n <MethodParametersCount>1</MethodParametersCount>\r\n <SourceFileName>ConsoleAppSamples.cs</SourceFileName>\r\n <SourceFileNameWithoutExtension>ConsoleAppSamples</SourceFileNameWithoutExtension>\r\n <SourceFileFolder>..\\..\\Views\\SPMeta2\\getting-started</SourceFileFolder>\r\n <SourceFilePath>..\\..\\Views\\SPMeta2\\getting-started\\ConsoleAppSamples.cs</SourceFilePath>\r\n</DocSample>") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<DocSample xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n <IsMethod>true</IsMethod>\r\n <IsClass>false</IsClass>\r\n <Tags />\r\n <Title>SettingUpSiteModels\r\n \r\n \r\n \r\n public void SettingUpSiteModels()\r\n {\r\n // step 1, setup your definition\r\n\r\n // step 2, setup your site models\r\n var taxonomyModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup site taxonomy\r\n });\r\n\r\n var featuresAndSandboxSolutionsModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup sandbox solutions and features\r\n });\r\n\r\n var fieldsAndContentTypesModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup fields and content types\r\n });\r\n\r\n // step 3, deploy site models\r\n }\r\n // step 1, setup your definition\r\n\r\n// step 2, setup your site models\r\nvar taxonomyModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n // setup site taxonomy\r\n});\r\n\r\nvar featuresAndSandboxSolutionsModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n // setup sandbox solutions and features\r\n});\r\n\r\nvar fieldsAndContentTypesModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n // setup fields and content types\r\n});\r\n\r\n// step 3, deploy site models\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n Models\r\n SettingUpSiteModels\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.Models.SettingUpSiteModels\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.Models\r\n 0\r\n Models.cs\r\n Models\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\Models.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n SettingUpWebModels\r\n \r\n \r\n \r\n public void SettingUpWebModels()\r\n {\r\n // step 1, setup your definition\r\n\r\n // step 2, setup your site models\r\n var featuresModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup features\r\n });\r\n\r\n var listsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup fields and content types\r\n });\r\n\r\n var navigationModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup web navigation\r\n });\r\n\r\n // step 3, deploy web models\r\n }\r\n // step 1, setup your definition\r\n\r\n// step 2, setup your site models\r\nvar featuresModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n // setup features\r\n});\r\n\r\nvar listsModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n // setup fields and content types\r\n});\r\n\r\nvar navigationModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n // setup web navigation\r\n});\r\n\r\n// step 3, deploy web models\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n Models\r\n SettingUpWebModels\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.Models.SettingUpWebModels\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.Models\r\n 0\r\n Models.cs\r\n Models\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\Models.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_SiteModel_CSOM\r\n \r\n \r\n \r\n public void Deploy_SiteModel_CSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(clientContext, siteModel);\r\n\r\n // deploy site model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(clientContext, siteModel);\r\n }\r\n }\r\n // setup url\r\nvar siteUrl = \"\";\r\n\r\n// create you model\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\n// setup client context\r\nusing (var clientContext = new ClientContext(siteUrl))\r\n{\r\n // deploy site model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(clientContext, siteModel);\r\n\r\n // deploy site model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(clientContext, siteModel);\r\n}\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_SiteModel_CSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_SiteModel_CSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_WebModel_CSOM\r\n \r\n \r\n \r\n public void Deploy_WebModel_CSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(webUrl))\r\n {\r\n // deploy web model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(clientContext, webModel);\r\n\r\n // deploy web model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeployWebModel(clientContext, webModel);\r\n }\r\n }\r\n // setup url\r\nvar webUrl = \"\";\r\n\r\n// create you model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n});\r\n\r\n// setup client context\r\nusing (var clientContext = new ClientContext(webUrl))\r\n{\r\n // deploy web model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(clientContext, webModel);\r\n\r\n // deploy web model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeployWebModel(clientContext, webModel);\r\n}\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_WebModel_CSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_WebModel_CSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_FarmModel_SSOM\r\n \r\n \r\n \r\n public void Deploy_FarmModel_SSOM()\r\n {\r\n // create you model\r\n var farmModel = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n\r\n });\r\n\r\n var spFarm = SPFarm.Local;\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployFarmModel(spFarm, farmModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployFarmModel(spFarm, farmModel);\r\n }\r\n // create you model\r\nvar farmModel = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n\r\n});\r\n\r\nvar spFarm = SPFarm.Local;\r\n\r\n// deploy site model with SharePoint Foundation SSOM API\r\nvar foundationProvisionService = new SSOMProvisionService();\r\nfoundationProvisionService.DeployFarmModel(spFarm, farmModel);\r\n\r\n// deploy site model with SharePoint Standard SSOM API\r\nvar standardProvisionService = new StandardSSOMProvisionService();\r\nstandardProvisionService.DeployFarmModel(spFarm, farmModel);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_FarmModel_SSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_FarmModel_SSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_WebApplicationModel_SSOM\r\n \r\n \r\n \r\n public void Deploy_WebApplicationModel_SSOM()\r\n {\r\n // setup url\r\n var webAppUrl = \"\";\r\n\r\n // create you model\r\n var webAppModel = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n\r\n });\r\n\r\n var spWebApp = SPWebApplication.Lookup(new Uri(webAppUrl));\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n }\r\n // setup url\r\nvar webAppUrl = \"\";\r\n\r\n// create you model\r\nvar webAppModel = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n\r\n});\r\n\r\nvar spWebApp = SPWebApplication.Lookup(new Uri(webAppUrl));\r\n\r\n// deploy site model with SharePoint Foundation SSOM API\r\nvar foundationProvisionService = new SSOMProvisionService();\r\nfoundationProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n\r\n// deploy site model with SharePoint Standard SSOM API\r\nvar standardProvisionService = new StandardSSOMProvisionService();\r\nstandardProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_WebApplicationModel_SSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_WebApplicationModel_SSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_SiteModel_SSOM\r\n \r\n \r\n \r\n public void Deploy_SiteModel_SSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(spSite, siteModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(spSite, siteModel);\r\n }\r\n }\r\n // setup url\r\nvar siteUrl = \"\";\r\n\r\n// create you model\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nusing (var spSite = new SPSite(siteUrl))\r\n{\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(spSite, siteModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(spSite, siteModel);\r\n}\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_SiteModel_SSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_SiteModel_SSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_WebModel_SSOM\r\n \r\n \r\n \r\n public void Deploy_WebModel_SSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(spWeb, webModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebModel(spWeb, webModel);\r\n }\r\n }\r\n }\r\n // setup url\r\nvar webUrl = \"\";\r\n\r\n// create you model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n});\r\n\r\nusing (var spSite = new SPSite(webUrl))\r\n{\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(spWeb, webModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebModel(spWeb, webModel);\r\n }\r\n}\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_WebModel_SSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_WebModel_SSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n <Description />\r\n <MethodBodyWithFunction>public void DeployIncrementally_Default_SSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardSSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(spWeb, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(spWeb, webModel);\r\n }\r\n }\r\n }</MethodBodyWithFunction>\r\n <MethodBody>var webUrl = \"\";\r\n\r\n// create you models\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n});\r\n\r\nusing (var spSite = new SPSite(webUrl))\r\n{\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardSSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(spWeb, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(spWeb, webModel);\r\n }\r\n}\r\n\r\n</MethodBody>\r\n <Language>cs</Language>\r\n <Namespace>SubPointSolutions.Docs.Views.Views.SPMeta2.reference</Namespace>\r\n <ClassName>ProvisionServices</ClassName>\r\n <MethodName>DeployIncrementally_Default_SSOM</MethodName>\r\n <ClassComment />\r\n <MethodFullName>SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.DeployIncrementally_Default_SSOM</MethodFullName>\r\n <ClassFullName>SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices</ClassFullName>\r\n <MethodParametersCount>0</MethodParametersCount>\r\n <SourceFileName>ProvisionServices.cs</SourceFileName>\r\n <SourceFileNameWithoutExtension>ProvisionServices</SourceFileNameWithoutExtension>\r\n <SourceFileFolder>..\\..\\Views\\SPMeta2\\reference</SourceFileFolder>\r\n <SourceFilePath>..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs</SourceFilePath>\r\n</DocSample>") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<DocSample xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n <IsMethod>true</IsMethod>\r\n <IsClass>false</IsClass>\r\n <Tags />\r\n <Title />\r\n <Description />\r\n <MethodBodyWithFunction>public void DeployIncrementally_Default_CSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardCSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(clientContext, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(clientContext, webModel);\r\n }\r\n }</MethodBodyWithFunction>\r\n <MethodBody>var webUrl = \"\";\r\n\r\n// create you models\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n});\r\n\r\n// setup client context\r\nusing (var clientContext = new ClientContext(siteUrl))\r\n{\r\n // deploy site model incrementally\r\n var provisionService = new StandardCSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(clientContext, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(clientContext, webModel);\r\n}\r\n\r\n</MethodBody>\r\n <Language>cs</Language>\r\n <Namespace>SubPointSolutions.Docs.Views.Views.SPMeta2.reference</Namespace>\r\n <ClassName>ProvisionServices</ClassName>\r\n <MethodName>DeployIncrementally_Default_CSOM</MethodName>\r\n <ClassComment />\r\n <MethodFullName>SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.DeployIncrementally_Default_CSOM</MethodFullName>\r\n <ClassFullName>SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices</ClassFullName>\r\n <MethodParametersCount>0</MethodParametersCount>\r\n <SourceFileName>ProvisionServices.cs</SourceFileName>\r\n <SourceFileNameWithoutExtension>ProvisionServices</SourceFileNameWithoutExtension>\r\n <SourceFileFolder>..\\..\\Views\\SPMeta2\\reference</SourceFileFolder>\r\n <SourceFilePath>..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs</SourceFilePath>\r\n</DocSample>") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<DocSample xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n <IsMethod>true</IsMethod>\r\n <IsClass>false</IsClass>\r\n <Tags />\r\n <Title>SiteModelProvision\r\n \r\n \r\n \r\n public void SiteModelProvision()\r\n {\r\n // tend to separate models into small logical pieces\r\n // later you would deploy either all of them or only required bits\r\n\r\n var taxonomyModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup taxonomy\r\n });\r\n\r\n var sandboxSolutionsModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup sandbox solutions\r\n });\r\n\r\n var siteFeaturesModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup features\r\n });\r\n\r\n var siteIAModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup IA\r\n });\r\n\r\n var userCustomActionsModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup user custom actions model\r\n });\r\n\r\n\r\n // deploy needed models - all of them or only required bits\r\n }\r\n // tend to separate models into small logical pieces\r\n// later you would deploy either all of them or only required bits\r\n\r\nvar taxonomyModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n // setup taxonomy\r\n});\r\n\r\nvar sandboxSolutionsModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n // setup sandbox solutions\r\n});\r\n\r\nvar siteFeaturesModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n // setup features\r\n});\r\n\r\nvar siteIAModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n // setup IA\r\n});\r\n\r\nvar userCustomActionsModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n // setup user custom actions model\r\n});\r\n\r\n\r\n// deploy needed models - all of them or only required bits\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteModel\r\n SiteModelProvision\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteModel.SiteModelProvision\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteModel\r\n 0\r\n SiteModel.cs\r\n SiteModel\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\SiteModel.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n UrlConcatenation\r\n \r\n \r\n \r\n public void UrlConcatenation()\r\n {\r\n // fast on two params\r\n var smQueryUrl = UrlUtility.CombineUrl(\"http://goole.com\", \"?q=spmeta2\");\r\n\r\n // a bigger one\r\n var bgQueryUrl = UrlUtility.CombineUrl(new string[]{ \r\n \"http://goole.com\",\r\n \"?\",\r\n \"q=1\",\r\n \"&p1=3\",\r\n \"&p2=tmp\"\r\n });\r\n }\r\n // fast on two params\r\nvar smQueryUrl = UrlUtility.CombineUrl(\"http://goole.com\", \"?q=spmeta2\");\r\n\r\n// a bigger one\r\nvar bgQueryUrl = UrlUtility.CombineUrl(new string[]{\r\n \"http://goole.com\",\r\n \"?\",\r\n \"q=1\",\r\n \"&p1=3\",\r\n \"&p2=tmp\"\r\n});\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n Utils\r\n UrlConcatenation\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.Utils.UrlConcatenation\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.Utils\r\n 0\r\n Utils.cs\r\n Utils\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\Utils.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n ClientWebPartSetup\r\n \r\n \r\n \r\n public void ClientWebPartSetup(ClientWebPartDefinition wpModel, string webId)\r\n {\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(BuiltInWebPartTemplates.ClientWebPart)\r\n .SetOrUpdateProperty(\"FeatureId\", wpModel.FeatureId.ToString())\r\n .SetOrUpdateProperty(\"ProductId\", wpModel.ProductId.ToString())\r\n .SetOrUpdateProperty(\"WebPartName\", wpModel.WebPartName)\r\n .SetOrUpdateProperty(\"ProductWebId\", webId)\r\n .ToString();\r\n }\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(BuiltInWebPartTemplates.ClientWebPart)\r\n .SetOrUpdateProperty(\"FeatureId\", wpModel.FeatureId.ToString())\r\n .SetOrUpdateProperty(\"ProductId\", wpModel.ProductId.ToString())\r\n .SetOrUpdateProperty(\"WebPartName\", wpModel.WebPartName)\r\n .SetOrUpdateProperty(\"ProductWebId\", webId)\r\n .ToString();\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n Utils\r\n ClientWebPartSetup\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.Utils.ClientWebPartSetup\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.Utils\r\n 2\r\n Utils.cs\r\n Utils\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\Utils.cs\r\n") , @@ -42,176 +50,177 @@ public static class m2Samples SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n XsltListViewWebPartSetup\r\n \r\n \r\n \r\n public void XsltListViewWebPartSetup(XsltListViewWebPartDefinition typedModel,\r\n string listName, string listId, string titleUrl, string jsLink)\r\n {\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(BuiltInWebPartTemplates.XsltListViewWebPart)\r\n .SetListName(listName)\r\n .SetListId(listId)\r\n .SetTitleUrl(titleUrl)\r\n .SetOrUpdateProperty(\"JSLink\", jsLink)\r\n .ToString();\r\n }\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(BuiltInWebPartTemplates.XsltListViewWebPart)\r\n .SetListName(listName)\r\n .SetListId(listId)\r\n .SetTitleUrl(titleUrl)\r\n .SetOrUpdateProperty(\"JSLink\", jsLink)\r\n .ToString();\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n Utils\r\n XsltListViewWebPartSetup\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.Utils.XsltListViewWebPartSetup\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.Utils\r\n 5\r\n Utils.cs\r\n Utils\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\Utils.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n WebModelProvision\r\n \r\n \r\n \r\n public void WebModelProvision()\r\n {\r\n // tend to separate models into small logical pieces\r\n // later you would deploy either all of them or only required bits\r\n\r\n var featuresModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup features\r\n });\r\n\r\n var listsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup lists and list views\r\n });\r\n\r\n var pagesModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup pages\r\n });\r\n\r\n var webPartsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup web parts\r\n });\r\n\r\n var navigationModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup navigation \r\n });\r\n\r\n // deploy needed models - all of them or only required bits\r\n }\r\n // tend to separate models into small logical pieces\r\n// later you would deploy either all of them or only required bits\r\n\r\nvar featuresModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n // setup features\r\n});\r\n\r\nvar listsModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n // setup lists and list views\r\n});\r\n\r\nvar pagesModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n // setup pages\r\n});\r\n\r\nvar webPartsModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n // setup web parts\r\n});\r\n\r\nvar navigationModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n // setup navigation\r\n});\r\n\r\n// deploy needed models - all of them or only required bits\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n WebModel\r\n WebModelProvision\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.WebModel.WebModelProvision\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.WebModel\r\n 0\r\n WebModel.cs\r\n WebModel\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\WebModel.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Sample Category Order\r\n \r\n 200\r\n \r\n \r\n \r\n Add alternate URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAlternateUrlDefinition()\r\n {\r\n var internalDef = new AlternateUrlDefinition\r\n {\r\n Url = \"http://the-portal\",\r\n UrlZone = BuiltInUrlZone.Intranet\r\n };\r\n\r\n var intranetDef = new AlternateUrlDefinition\r\n {\r\n Url = \"http://my-intranet.com.au\",\r\n UrlZone = BuiltInUrlZone.Internet\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddAlternateUrl(internalDef);\r\n webApp.AddAlternateUrl(intranetDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var internalDef = new AlternateUrlDefinition\r\n{\r\n Url = \"http://the-portal\",\r\n UrlZone = BuiltInUrlZone.Intranet\r\n};\r\n\r\nvar intranetDef = new AlternateUrlDefinition\r\n{\r\n Url = \"http://my-intranet.com.au\",\r\n UrlZone = BuiltInUrlZone.Internet\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n webApp.AddAlternateUrl(internalDef);\r\n webApp.AddAlternateUrl(intranetDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AlternateUrlDefinitionTests\r\n CanDeploySimpleAlternateUrlDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AlternateUrlDefinitionTests.CanDeploySimpleAlternateUrlDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AlternateUrlDefinitionTests\r\n 0\r\n AlternateUrlDefinitionTests.cs\r\n AlternateUrlDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AlternateUrlDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add app\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version \r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var appDef = new AppDefinition\r\n{\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version\r\n Version = \"1.0.0.0\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddApp(appDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppDefinitionTests\r\n CanDeploySimpleAppDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests.CanDeploySimpleAppDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests\r\n 0\r\n AppDefinitionTests.cs\r\n AppDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add app principal\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppPrincipalDefinitionTests\r\n CanDeploySimpleAppPrincipalDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests.CanDeploySimpleAppPrincipalDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests\r\n 0\r\n AppPrincipalDefinitionTests.cs\r\n AppPrincipalDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppPrincipalDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add audit settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AuditSettingsDefinitionTests\r\n CanDeploySimpleAuditSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests.CanDeploySimpleAuditSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests\r\n 0\r\n AuditSettingsDefinitionTests.cs\r\n AuditSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AuditSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add boolean field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BooleanFieldDefinitionTests\r\n CanDeploySimpleBooleanFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests.CanDeploySimpleBooleanFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests\r\n 0\r\n BooleanFieldDefinitionTests.cs\r\n BooleanFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BooleanFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Break role inheritance on web\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var privateProjectWebDef = new WebDefinition\r\n{\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n{\r\n CopyRoleAssignments = false\r\n};\r\n\r\nvar privateSecurityGroupMembers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Members\"\r\n};\r\n\r\nvar privateSecurityGroupViewers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Viewers\"\r\n};\r\n\r\n// site model with the groups\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n);\r\n\r\n// web model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n});\r\n\r\n// deploy site model with groups, and then web model with the rest\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n CanDeploySimpleBreakRoleInheritance_OnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests.CanDeploySimpleBreakRoleInheritance_OnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Break role inheritance on list\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var privateListDef = new ListDefinition\r\n{\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n};\r\n\r\nvar privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n{\r\n CopyRoleAssignments = false\r\n};\r\n\r\nvar privateSecurityGroupMembers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Members\"\r\n};\r\n\r\nvar privateSecurityGroupViewers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Viewers\"\r\n};\r\n\r\n// site model with the groups\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n});\r\n\r\n// web model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n});\r\n\r\n// deploy site model with groups, and then web model with the rest\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n CanDeploySimpleBreakRoleInheritance_OnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests.CanDeploySimpleBreakRoleInheritance_OnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Web site\r\n \r\n \r\n \r\n Add app\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version \r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var appDef = new AppDefinition\r\n{\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version\r\n Version = \"1.0.0.0\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddApp(appDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppDefinitionTests\r\n CanDeploySimpleAppDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests.CanDeploySimpleAppDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests\r\n 0\r\n AppDefinitionTests.cs\r\n AppDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add app principal\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppPrincipalDefinitionTests\r\n CanDeploySimpleAppPrincipalDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests.CanDeploySimpleAppPrincipalDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests\r\n 0\r\n AppPrincipalDefinitionTests.cs\r\n AppPrincipalDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppPrincipalDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Add audit settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AuditSettingsDefinitionTests\r\n CanDeploySimpleAuditSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests.CanDeploySimpleAuditSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests\r\n 0\r\n AuditSettingsDefinitionTests.cs\r\n AuditSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AuditSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add boolean field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BooleanFieldDefinitionTests\r\n CanDeploySimpleBooleanFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests.CanDeploySimpleBooleanFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests\r\n 0\r\n BooleanFieldDefinitionTests.cs\r\n BooleanFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BooleanFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Break role inheritance on web\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var privateProjectWebDef = new WebDefinition\r\n{\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n{\r\n CopyRoleAssignments = false\r\n};\r\n\r\nvar privateSecurityGroupMembers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Members\"\r\n};\r\n\r\nvar privateSecurityGroupViewers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Viewers\"\r\n};\r\n\r\n// site model with the groups\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n);\r\n\r\n// web model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n});\r\n\r\n// deploy site model with groups, and then web model with the rest\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n CanDeploySimpleBreakRoleInheritance_OnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests.CanDeploySimpleBreakRoleInheritance_OnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Break role inheritance on list\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var privateListDef = new ListDefinition\r\n{\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n};\r\n\r\nvar privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n{\r\n CopyRoleAssignments = false\r\n};\r\n\r\nvar privateSecurityGroupMembers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Members\"\r\n};\r\n\r\nvar privateSecurityGroupViewers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Viewers\"\r\n};\r\n\r\n// site model with the groups\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n});\r\n\r\n// web model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n});\r\n\r\n// deploy site model with groups, and then web model with the rest\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n CanDeploySimpleBreakRoleInheritance_OnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests.CanDeploySimpleBreakRoleInheritance_OnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add business data field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleBusinessDataFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BusinessDataFieldDefinitionTests\r\n CanDeploySimpleBusinessDataFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BusinessDataFieldDefinitionTests.CanDeploySimpleBusinessDataFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BusinessDataFieldDefinitionTests\r\n 0\r\n BusinessDataFieldDefinitionTests.cs\r\n BusinessDataFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BusinessDataFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add calculated field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CalculatedFieldDefinitionTests\r\n CanDeploySimpleCalculatedFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests.CanDeploySimpleCalculatedFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests\r\n 0\r\n CalculatedFieldDefinitionTests.cs\r\n CalculatedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CalculatedFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add choice field\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var fieldDef = new ChoiceFieldDefinition\r\n{\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddChoiceField(fieldDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ChoiceFieldDefinitionTests\r\n CanDeploySimpleChoiceFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests.CanDeploySimpleChoiceFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests\r\n 0\r\n ChoiceFieldDefinitionTests.cs\r\n ChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ChoiceFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add calculated field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CalculatedFieldDefinitionTests\r\n CanDeploySimpleCalculatedFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests.CanDeploySimpleCalculatedFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests\r\n 0\r\n CalculatedFieldDefinitionTests.cs\r\n CalculatedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CalculatedFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add choice field\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var fieldDef = new ChoiceFieldDefinition\r\n{\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddChoiceField(fieldDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ChoiceFieldDefinitionTests\r\n CanDeploySimpleChoiceFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests.CanDeploySimpleChoiceFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests\r\n 0\r\n ChoiceFieldDefinitionTests.cs\r\n ChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ChoiceFieldDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add client web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleClientWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ClientWebPartDefinitionTests\r\n CanDeploySimpleClientWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ClientWebPartDefinitionTests.CanDeploySimpleClientWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ClientWebPartDefinitionTests\r\n 0\r\n ClientWebPartDefinitionTests.cs\r\n ClientWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ClientWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add computed field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ComputedFieldDefinitionTests\r\n CanDeploySimpleComputedFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests.CanDeploySimpleComputedFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests\r\n 0\r\n ComputedFieldDefinitionTests.cs\r\n ComputedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ComputedFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category Order\r\n \r\n 100\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Add content database\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var contentDb1 = new ContentDatabaseDefinition\r\n{\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n};\r\n\r\nvar contentDb2 = new ContentDatabaseDefinition\r\n{\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentDatabaseDefinitionTests\r\n CanDeploySimpleContentDatabaseDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests.CanDeploySimpleContentDatabaseDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests\r\n 0\r\n ContentDatabaseDefinitionTests.cs\r\n ContentDatabaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentDatabaseDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeploEmptyContentEditorWebpart\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeploEmptyContentEditorWebpart\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP with link\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var htmlContent = new ModuleFileDefinition\r\n{\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n};\r\n\r\nvar cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeploContentEditorWebpartWithUrlLink\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeploContentEditorWebpartWithUrlLink\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP with content\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeployContentEditorWebpartWithContent\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeployContentEditorWebpartWithContent\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add item content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(listContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleListContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleListContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add document content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var documentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(documentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleDocumentContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleDocumentContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add document set content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var documentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(documentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleDocumentSetContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleDocumentSetContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add several content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleContentTypes\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleContentTypes\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add content type with fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleContentTypesWithFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleContentTypesWithFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add parent-child content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar childDocumentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeployHierarhicalContentTypes\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeployHierarhicalContentTypes\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add computed field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ComputedFieldDefinitionTests\r\n CanDeploySimpleComputedFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests.CanDeploySimpleComputedFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests\r\n 0\r\n ComputedFieldDefinitionTests.cs\r\n ComputedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ComputedFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category Order\r\n \r\n 100\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Add content database\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var contentDb1 = new ContentDatabaseDefinition\r\n{\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n};\r\n\r\nvar contentDb2 = new ContentDatabaseDefinition\r\n{\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentDatabaseDefinitionTests\r\n CanDeploySimpleContentDatabaseDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests.CanDeploySimpleContentDatabaseDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests\r\n 0\r\n ContentDatabaseDefinitionTests.cs\r\n ContentDatabaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentDatabaseDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeploEmptyContentEditorWebpart\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeploEmptyContentEditorWebpart\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP with link\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var htmlContent = new ModuleFileDefinition\r\n{\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n};\r\n\r\nvar cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeploContentEditorWebpartWithUrlLink\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeploContentEditorWebpartWithUrlLink\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP with content\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeployContentEditorWebpartWithContent\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeployContentEditorWebpartWithContent\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add item content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(listContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleListContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleListContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add document content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var documentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(documentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleDocumentContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleDocumentContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add document set content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var documentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(documentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleDocumentSetContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleDocumentSetContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add several content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleContentTypes\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleContentTypes\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add content type with fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleContentTypesWithFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleContentTypesWithFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add parent-child content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar childDocumentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeployHierarhicalContentTypes\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeployHierarhicalContentTypes\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add field to content types\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContentTypeFieldLinkDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeFieldLinkDefinitionTests\r\n CanDeploySimpleContentTypeFieldLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeFieldLinkDefinitionTests.CanDeploySimpleContentTypeFieldLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeFieldLinkDefinitionTests\r\n 0\r\n ContentTypeFieldLinkDefinitionTests.cs\r\n ContentTypeFieldLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeFieldLinkDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add content type to lists\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContentTypeLinkDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeLinkDefinitionTests\r\n CanDeploySimpleContentTypeLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests.CanDeploySimpleContentTypeLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests\r\n 0\r\n ContentTypeLinkDefinitionTests.cs\r\n ContentTypeLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeLinkDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add currency field\r\n \r\n \r\n \r\n\r\n\r\n \r\n \r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CurrencyFieldDefinitionTests\r\n CanDeploySimpleCurrencyFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests.CanDeploySimpleCurrencyFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests\r\n 0\r\n CurrencyFieldDefinitionTests.cs\r\n CurrencyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CurrencyFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add datetime field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DateTimeFieldDefinitionTests\r\n CanDeploySimpleDateTimeFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests.CanDeploySimpleDateTimeFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests\r\n 0\r\n DateTimeFieldDefinitionTests.cs\r\n DateTimeFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DateTimeFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add content type to list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListItemContentTypeLinkDefinition()\r\n {\r\n var customerInfoContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Information\",\r\n Id = new Guid(\"e33acc19-6d61-43b0-a313-4177065cd7c3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Information\",\r\n Description = \"A list to store customer information.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"CustomerInfo\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerInfoContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customerInfoContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Customer Information\",\r\n Id = new Guid(\"e33acc19-6d61-43b0-a313-4177065cd7c3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar customerInfoList = new ListDefinition\r\n{\r\n Title = \"Customer Information\",\r\n Description = \"A list to store customer information.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"CustomerInfo\",\r\n ContentTypesEnabled = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerInfoContentType);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeLinkDefinitionTests\r\n CanDeployListItemContentTypeLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests.CanDeployListItemContentTypeLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests\r\n 0\r\n ContentTypeLinkDefinitionTests.cs\r\n ContentTypeLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeLinkDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add content type to document library\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployDocumentItemContentTypeLinkDefinition()\r\n {\r\n var customerReportContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Report\",\r\n Id = new Guid(\"1836765c-6264-479b-a95b-a553a3d14ba3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Reports\",\r\n Description = \"A list to store customer reports.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerReports\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerReportContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customerReportContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Customer Report\",\r\n Id = new Guid(\"1836765c-6264-479b-a95b-a553a3d14ba3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar customerInfoList = new ListDefinition\r\n{\r\n Title = \"Customer Reports\",\r\n Description = \"A list to store customer reports.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerReports\",\r\n ContentTypesEnabled = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerReportContentType);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeLinkDefinitionTests\r\n CanDeployDocumentItemContentTypeLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests.CanDeployDocumentItemContentTypeLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests\r\n 0\r\n ContentTypeLinkDefinitionTests.cs\r\n ContentTypeLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeLinkDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add currency field\r\n \r\n \r\n \r\n\r\n\r\n \r\n \r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CurrencyFieldDefinitionTests\r\n CanDeploySimpleCurrencyFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests.CanDeploySimpleCurrencyFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests\r\n 0\r\n CurrencyFieldDefinitionTests.cs\r\n CurrencyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CurrencyFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add datetime field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DateTimeFieldDefinitionTests\r\n CanDeploySimpleDateTimeFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests.CanDeploySimpleDateTimeFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests\r\n 0\r\n DateTimeFieldDefinitionTests.cs\r\n DateTimeFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DateTimeFieldDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Delete web part by Title\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeployDeleteWebPartsDefinition_ByTitle()\r\n {\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts\",\r\n FileName = \"web-parts.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // aiming to delete two web part with the following titles:\r\n // \'My Tasks\'\r\n // \'My Projects\'\r\n var myWebPartDeletionDef = new DeleteWebPartsDefinition\r\n {\r\n WebParts = new List<WebPartMatch>(new WebPartMatch[] { \r\n new WebPartMatch {\r\n Title = \"My Tasks\"\r\n },\r\n new WebPartMatch {\r\n Title = \"My Projects\"\r\n }\r\n })\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddDeleteWebParts(myWebPartDeletionDef);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts\",\r\n FileName = \"web-parts.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\n// aiming to delete two web part with the following titles:\r\n// \'My Tasks\'\r\n// \'My Projects\'\r\nvar myWebPartDeletionDef = new DeleteWebPartsDefinition\r\n{\r\n WebParts = new List<WebPartMatch>(new WebPartMatch[] {\r\n new WebPartMatch {\r\n Title = \"My Tasks\"\r\n },\r\n new WebPartMatch {\r\n Title = \"My Projects\"\r\n }\r\n })\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddDeleteWebParts(myWebPartDeletionDef);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DeleteWebPartsDefinitionTests\r\n CanDeployDeleteWebPartsDefinition_ByTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DeleteWebPartsDefinitionTests.CanDeployDeleteWebPartsDefinition_ByTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DeleteWebPartsDefinitionTests\r\n 0\r\n DeleteWebPartsDefinitionTests.cs\r\n DeleteWebPartsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DeleteWebPartsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add diagnostic service\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DiagnosticsServiceBaseDefinitionTests\r\n CanDeploySimpleDiagnosticsServiceBaseDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests.CanDeploySimpleDiagnosticsServiceBaseDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests\r\n 0\r\n DiagnosticsServiceBaseDefinitionTests.cs\r\n DiagnosticsServiceBaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DiagnosticsServiceBaseDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add diagnostic service\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DiagnosticsServiceBaseDefinitionTests\r\n CanDeploySimpleDiagnosticsServiceBaseDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests.CanDeploySimpleDiagnosticsServiceBaseDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests\r\n 0\r\n DiagnosticsServiceBaseDefinitionTests.cs\r\n DiagnosticsServiceBaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DiagnosticsServiceBaseDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add document parser\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleDocumentParserDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DocumentParserDefinitionTests\r\n CanDeploySimpleDocumentParserDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DocumentParserDefinitionTests.CanDeploySimpleDocumentParserDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DocumentParserDefinitionTests\r\n 0\r\n DocumentParserDefinitionTests.cs\r\n DocumentParserDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DocumentParserDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Event Receivers\r\n \r\n \r\n \r\n Add event receiver to site\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySiteEventReceiverDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n EventReceiverDefinitionTests\r\n CanDeploySiteEventReceiverDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.EventReceiverDefinitionTests.CanDeploySiteEventReceiverDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.EventReceiverDefinitionTests\r\n 0\r\n EventReceiverDefinitionTests.cs\r\n EventReceiverDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\EventReceiverDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Event Receivers\r\n \r\n \r\n \r\n Add event receiver to web\r\n \r\n \r\n \r\n public void CanDeployWebSimpleEventReceiverDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n EventReceiverDefinitionTests\r\n CanDeployWebSimpleEventReceiverDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.EventReceiverDefinitionTests.CanDeployWebSimpleEventReceiverDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.EventReceiverDefinitionTests\r\n 0\r\n EventReceiverDefinitionTests.cs\r\n EventReceiverDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\EventReceiverDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Event Receivers\r\n \r\n \r\n \r\n Add event receiver to list\r\n \r\n \r\n \r\n public void CanDeployListSimpleEventReceiverDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n EventReceiverDefinitionTests\r\n CanDeployListSimpleEventReceiverDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.EventReceiverDefinitionTests.CanDeployListSimpleEventReceiverDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.EventReceiverDefinitionTests\r\n 0\r\n EventReceiverDefinitionTests.cs\r\n EventReceiverDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\EventReceiverDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Event Receivers\r\n \r\n \r\n \r\n Add event receiver to content type\r\n \r\n \r\n \r\n public void CanDeployContentTypeSimpleEventReceiverDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n EventReceiverDefinitionTests\r\n CanDeployContentTypeSimpleEventReceiverDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.EventReceiverDefinitionTests.CanDeployContentTypeSimpleEventReceiverDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.EventReceiverDefinitionTests\r\n 0\r\n EventReceiverDefinitionTests.cs\r\n EventReceiverDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\EventReceiverDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add farm feature\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n{\r\n f.Enable = true;\r\n});\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm.AddFarmFeature(farmFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmDefinitionTests\r\n CanDeploySimpleFarmDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests.CanDeploySimpleFarmDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests\r\n 0\r\n FarmDefinitionTests.cs\r\n FarmDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add farm solution\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var solutionDef = new FarmSolutionDefinition\r\n{\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n};\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm.AddFarmSolution(solutionDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmSolutionDefinitionTests\r\n CanDeploySimpleFarmSolutionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests.CanDeploySimpleFarmSolutionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests\r\n 0\r\n FarmSolutionDefinitionTests.cs\r\n FarmSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmSolutionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate OOTB site features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateOOTBSiteFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateOOTBSiteFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate OOTB web features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateOOTBWebFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateOOTBWebFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Disable OOTB web features\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanDeactivateOOTBWebFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanDeactivateOOTBWebFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate custom web features\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var myCustomerFeature = new FeatureDefinition\r\n{\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateCustomWebFeature\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateCustomWebFeature\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Disable custom web features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var myCustomerFeature = new FeatureDefinition\r\n{\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanDeactivateCustomWebFeature\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanDeactivateCustomWebFeature\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Inherit OOTB features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n{\r\n def.Enable = true;\r\n});\r\n\r\nvar disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n{\r\n def.Enable = false;\r\n});\r\n\r\n// enable MDS\r\nvar enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n});\r\n\r\nDeployModel(enableMdsModel);\r\n\r\n// disable MDS\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n OOTBFeatureInheritance\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.OOTBFeatureInheritance\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add field to site\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\nvar customerRefererence = new FieldDefinition\r\n{\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar isAciveClient = new FieldDefinition\r\n{\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar additionalInformation = new FieldDefinition\r\n{\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n};\r\n\r\nvar customerBalance = new FieldDefinition\r\n{\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeploySiteFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeploySiteFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add field to web\r\n \r\n \r\n \r\n\r\n \r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var textField = new FieldDefinition\r\n{\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar booleanField = new FieldDefinition\r\n{\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar listWithFields = new ListDefinition\r\n{\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeployWebFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeployWebFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add field to list\r\n \r\n \r\n \r\n\r\n \r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var textField = new FieldDefinition\r\n{\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar booleanField = new FieldDefinition\r\n{\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar listWithFields = new ListDefinition\r\n{\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeployListFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeployListFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add folders\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var activeDocsFolder = new FolderDefinition\r\n{\r\n Name = \"Active documents\"\r\n};\r\n\r\nvar archiveFolder = new FolderDefinition\r\n{\r\n Name = \"Archive\"\r\n};\r\n\r\nvar listWithFolders = new ListDefinition\r\n{\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeploySimpleFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeploySimpleFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add folders to list\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeploySimpleFolderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeploySimpleFolderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add folder hierarchy to list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeployHierarchicalFolderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeployHierarchicalFolderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add guid field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n GuidFieldDefinitionTests\r\n CanDeploySimpleGuidFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests.CanDeploySimpleGuidFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests\r\n 0\r\n GuidFieldDefinitionTests.cs\r\n GuidFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\GuidFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Reorder content type fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var hiddenNotesField = new NoteFieldDefinition\r\n{\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n};\r\n\r\nvar publicNotesField = new NoteFieldDefinition\r\n{\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n};\r\n\r\nvar hiddenNotesContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HideContentTypeFieldLinksDefinitionTests\r\n CanHideContentTypeFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests.CanHideContentTypeFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests\r\n 0\r\n HideContentTypeFieldLinksDefinitionTests.cs\r\n HideContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\HideContentTypeFieldLinksDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add farm feature\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n{\r\n f.Enable = true;\r\n});\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm.AddFarmFeature(farmFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmDefinitionTests\r\n CanDeploySimpleFarmDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests.CanDeploySimpleFarmDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests\r\n 0\r\n FarmDefinitionTests.cs\r\n FarmDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add farm solution\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var solutionDef = new FarmSolutionDefinition\r\n{\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n};\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm.AddFarmSolution(solutionDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmSolutionDefinitionTests\r\n CanDeploySimpleFarmSolutionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests.CanDeploySimpleFarmSolutionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests\r\n 0\r\n FarmSolutionDefinitionTests.cs\r\n FarmSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmSolutionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate OOTB site features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateOOTBSiteFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateOOTBSiteFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate OOTB web features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateOOTBWebFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateOOTBWebFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Disable OOTB web features\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanDeactivateOOTBWebFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanDeactivateOOTBWebFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate custom web features\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var myCustomerFeature = new FeatureDefinition\r\n{\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateCustomWebFeature\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateCustomWebFeature\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Disable custom web features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var myCustomerFeature = new FeatureDefinition\r\n{\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanDeactivateCustomWebFeature\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanDeactivateCustomWebFeature\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Inherit OOTB features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n{\r\n def.Enable = true;\r\n});\r\n\r\nvar disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n{\r\n def.Enable = false;\r\n});\r\n\r\n// enable MDS\r\nvar enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n});\r\n\r\nDeployModel(enableMdsModel);\r\n\r\n// disable MDS\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n OOTBFeatureInheritance\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.OOTBFeatureInheritance\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add field to site\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\nvar customerRefererence = new FieldDefinition\r\n{\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar isAciveClient = new FieldDefinition\r\n{\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar additionalInformation = new FieldDefinition\r\n{\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n};\r\n\r\nvar customerBalance = new FieldDefinition\r\n{\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeploySiteFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeploySiteFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add field to web\r\n \r\n \r\n \r\n\r\n \r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var textField = new FieldDefinition\r\n{\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar booleanField = new FieldDefinition\r\n{\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar listWithFields = new ListDefinition\r\n{\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeployWebFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeployWebFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add field to list\r\n \r\n \r\n \r\n\r\n \r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var textField = new FieldDefinition\r\n{\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar booleanField = new FieldDefinition\r\n{\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar listWithFields = new ListDefinition\r\n{\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeployListFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeployListFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add folders\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var activeDocsFolder = new FolderDefinition\r\n{\r\n Name = \"Active documents\"\r\n};\r\n\r\nvar archiveFolder = new FolderDefinition\r\n{\r\n Name = \"Archive\"\r\n};\r\n\r\nvar listWithFolders = new ListDefinition\r\n{\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeploySimpleFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeploySimpleFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add folders to list\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeploySimpleFolderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeploySimpleFolderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add folder hierarchy to list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeployHierarchicalFolderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeployHierarchicalFolderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add guid field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n GuidFieldDefinitionTests\r\n CanDeploySimpleGuidFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests.CanDeploySimpleGuidFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests\r\n 0\r\n GuidFieldDefinitionTests.cs\r\n GuidFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\GuidFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Reorder content type fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var hiddenNotesField = new NoteFieldDefinition\r\n{\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n};\r\n\r\nvar publicNotesField = new NoteFieldDefinition\r\n{\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n};\r\n\r\nvar hiddenNotesContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HideContentTypeFieldLinksDefinitionTests\r\n CanHideContentTypeFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests.CanHideContentTypeFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests\r\n 0\r\n HideContentTypeFieldLinksDefinitionTests.cs\r\n HideContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\HideContentTypeFieldLinksDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Hide content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypesInList()\r\n {\r\n var newAnnualReportContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Annual Report 2015\",\r\n Id = new Guid(\"7B3378FF-11DF-430B-830F-C63FABA4712F\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var oldAnnualReportContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Annual Report 2014\",\r\n Id = new Guid(\"DEB586C5-ED08-4D06-98F6-9FC5002986D2\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(newAnnualReportContentType)\r\n .AddContentType(oldAnnualReportContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(newAnnualReportContentType)\r\n .AddContentTypeLink(oldAnnualReportContentType)\r\n .AddHideContentTypeLinks(new HideContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\" },\r\n new ContentTypeLinkValue{ ContentTypeName = oldAnnualReportContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var newAnnualReportContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Annual Report 2015\",\r\n Id = new Guid(\"7B3378FF-11DF-430B-830F-C63FABA4712F\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar oldAnnualReportContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Annual Report 2014\",\r\n Id = new Guid(\"DEB586C5-ED08-4D06-98F6-9FC5002986D2\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar annualReportsList = new ListDefinition\r\n{\r\n Title = \"M2 Annual Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualReports\"\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(newAnnualReportContentType)\r\n .AddContentType(oldAnnualReportContentType);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(annualReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(newAnnualReportContentType)\r\n .AddContentTypeLink(oldAnnualReportContentType)\r\n .AddHideContentTypeLinks(new HideContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\" },\r\n new ContentTypeLinkValue{ ContentTypeName = oldAnnualReportContentType.Name }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HideContentTypeLinksDefinitionTests\r\n CanHideContentTypesInList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeLinksDefinitionTests.CanHideContentTypesInList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeLinksDefinitionTests\r\n 0\r\n HideContentTypeLinksDefinitionTests.cs\r\n HideContentTypeLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\HideContentTypeLinksDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Add IRM settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n InformationRightsManagementSettingsDefinitionTests\r\n CanDeploySimpleInformationRightsManagementSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests.CanDeploySimpleInformationRightsManagementSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests\r\n 0\r\n InformationRightsManagementSettingsDefinitionTests.cs\r\n InformationRightsManagementSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\InformationRightsManagementSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add timer job\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JobDefinitionTests\r\n CanDeploySimpleJobDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests.CanDeploySimpleJobDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests\r\n 0\r\n JobDefinitionTests.cs\r\n JobDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\JobDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list by template type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var genericList = new ListDefinition\r\n{\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployListByTemplateId\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployListByTemplateId\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list by template name\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var contactsList = new ListDefinition\r\n{\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(contactsList);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployListByTemplateName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployListByTemplateName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add host Style Library\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployStyleLibrary\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployStyleLibrary\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add host OOTB lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployOOTBListsLibrary\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployOOTBListsLibrary\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add multiple lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeploySimpleLists\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeploySimpleLists\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add promoted links list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listDef = new ListDefinition\r\n{\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployPromotedLinksList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployPromotedLinksList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add field links to list\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var fieldDef = new TextFieldDefinition\r\n{\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n};\r\n\r\nvar listDef = new ListDefinition\r\n{\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTextField(fieldDef);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListFieldLinkDefinitionTests\r\n CanDeploySimpleListFieldLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests.CanDeploySimpleListFieldLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests\r\n 0\r\n ListFieldLinkDefinitionTests.cs\r\n ListFieldLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListFieldLinkDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Add IRM settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n InformationRightsManagementSettingsDefinitionTests\r\n CanDeploySimpleInformationRightsManagementSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests.CanDeploySimpleInformationRightsManagementSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests\r\n 0\r\n InformationRightsManagementSettingsDefinitionTests.cs\r\n InformationRightsManagementSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\InformationRightsManagementSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add timer job\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JobDefinitionTests\r\n CanDeploySimpleJobDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests.CanDeploySimpleJobDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests\r\n 0\r\n JobDefinitionTests.cs\r\n JobDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\JobDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add list by template type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var genericList = new ListDefinition\r\n{\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployListByTemplateId\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployListByTemplateId\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add list by template name\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var contactsList = new ListDefinition\r\n{\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(contactsList);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployListByTemplateName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployListByTemplateName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add host Style Library\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployStyleLibrary\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployStyleLibrary\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add host OOTB lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployOOTBListsLibrary\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployOOTBListsLibrary\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add multiple lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeploySimpleLists\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeploySimpleLists\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add promoted links list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listDef = new ListDefinition\r\n{\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployPromotedLinksList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployPromotedLinksList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Add field links to list\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var fieldDef = new TextFieldDefinition\r\n{\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n};\r\n\r\nvar listDef = new ListDefinition\r\n{\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTextField(fieldDef);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListFieldLinkDefinitionTests\r\n CanDeploySimpleListFieldLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests.CanDeploySimpleListFieldLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests\r\n 0\r\n ListFieldLinkDefinitionTests.cs\r\n ListFieldLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListFieldLinkDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list item\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListItemDefinition()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list\r\n .AddListItem(new ListItemDefinition { Title = \"Microsoft\" })\r\n .AddListItem(new ListItemDefinition { Title = \"Apple\" })\r\n .AddListItem(new ListItemDefinition { Title = \"IBM\" });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listDef = new ListDefinition\r\n{\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef, list =>\r\n {\r\n list\r\n .AddListItem(new ListItemDefinition { Title = \"Microsoft\" })\r\n .AddListItem(new ListItemDefinition { Title = \"Apple\" })\r\n .AddListItem(new ListItemDefinition { Title = \"IBM\" });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListItemDefinitionTests\r\n CanDeploySimpleListItemDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemDefinitionTests.CanDeploySimpleListItemDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemDefinitionTests\r\n 0\r\n ListItemDefinitionTests.cs\r\n ListItemDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListItemDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Add list item field value\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListItemFieldValueDefinitionTests\r\n CanDeploySimpleListItemFieldValueDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests.CanDeploySimpleListItemFieldValueDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests\r\n 0\r\n ListItemFieldValueDefinitionTests.cs\r\n ListItemFieldValueDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListItemFieldValueDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list view\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var approvedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar inProgressDocuments = new ListViewDefinition\r\n{\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViews\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViews\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list view with URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var returnedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViewsWithCustomUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViewsWithCustomUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list view with CAML\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var createdQuery = new StringBuilder();\r\n\r\ncreatedQuery.Append(\"<Where>\");\r\ncreatedQuery.Append(\"</Where>\");\r\ncreatedQuery.Append(\"<OrderBy>\");\r\ncreatedQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\ncreatedQuery.Append(\"</OrderBy>\");\r\n\r\nvar lastTenCreatedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar editedQuery = new StringBuilder();\r\n\r\neditedQuery.Append(\"<Where>\");\r\neditedQuery.Append(\"</Where>\");\r\neditedQuery.Append(\"<OrderBy>\");\r\neditedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\neditedQuery.Append(\"</OrderBy>\");\r\n\r\nvar lastTenEditedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViewsWithCAMLQuery\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViewsWithCAMLQuery\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add LVWP binded to list by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var travelRequests = new ListDefinition\r\n{\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add LVWP binded to list by URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var annualReviewsLibrary = new ListDefinition\r\n{\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add LVWP binded to list view by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var incidentsLibrary = new ListDefinition\r\n{\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n};\r\n\r\nvar incidentsView = new ListViewDefinition\r\n{\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListViewTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListViewTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add LVWP binded to calendar view\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var companyEvents = new ListDefinition\r\n{\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartToCalendarView\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartToCalendarView\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add lookup field\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var emptyLookupField = new LookupFieldDefinition\r\n{\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(emptyLookupField);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n CanDeployEmptyLookupField\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests.CanDeployEmptyLookupField\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add lookup field binded to list\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n var leadTypeLookup = new LookupFieldDefinition\r\n{\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n};\r\n\r\nvar lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(leadTypeLookup);\r\n});\r\n\r\nvar leadRecords = new ListDefinition\r\n{\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n};\r\n\r\nvar leadRecordTypes = new ListDefinition\r\n{\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n};\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n});\r\n\r\n// 1. deploy lookup field without bindings\r\nDeployModel(lookupFieldModel);\r\n\r\n// 2. deploy lists\r\nDeployModel(webModel);\r\n\r\n// 3. update binding for the lookup field\r\n// LookupList/LookupListId could also be used\r\nleadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n// 4. deploy lookup field again, so that it will be binded\r\nDeployModel(lookupFieldModel);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n CanDeployLookupFieldBindedToList\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests.CanDeployLookupFieldBindedToList\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list item field value\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListItemFieldValueDefinitionTests\r\n CanDeploySimpleListItemFieldValueDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests.CanDeploySimpleListItemFieldValueDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests\r\n 0\r\n ListItemFieldValueDefinitionTests.cs\r\n ListItemFieldValueDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListItemFieldValueDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n Add list view\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var approvedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar inProgressDocuments = new ListViewDefinition\r\n{\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViews\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViews\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n Add list view with URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var returnedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViewsWithCustomUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViewsWithCustomUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n Add list view with CAML\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var createdQuery = new StringBuilder();\r\n\r\ncreatedQuery.Append(\"<Where>\");\r\ncreatedQuery.Append(\"</Where>\");\r\ncreatedQuery.Append(\"<OrderBy>\");\r\ncreatedQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\ncreatedQuery.Append(\"</OrderBy>\");\r\n\r\nvar lastTenCreatedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar editedQuery = new StringBuilder();\r\n\r\neditedQuery.Append(\"<Where>\");\r\neditedQuery.Append(\"</Where>\");\r\neditedQuery.Append(\"<OrderBy>\");\r\neditedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\neditedQuery.Append(\"</OrderBy>\");\r\n\r\nvar lastTenEditedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViewsWithCAMLQuery\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViewsWithCAMLQuery\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add LVWP binded to list by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var travelRequests = new ListDefinition\r\n{\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add LVWP binded to list by URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var annualReviewsLibrary = new ListDefinition\r\n{\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add LVWP binded to list view by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var incidentsLibrary = new ListDefinition\r\n{\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n};\r\n\r\nvar incidentsView = new ListViewDefinition\r\n{\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListViewTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListViewTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add LVWP binded to calendar view\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var companyEvents = new ListDefinition\r\n{\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartToCalendarView\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartToCalendarView\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add lookup field\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var emptyLookupField = new LookupFieldDefinition\r\n{\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(emptyLookupField);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n CanDeployEmptyLookupField\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests.CanDeployEmptyLookupField\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add lookup field binded to list\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n var leadTypeLookup = new LookupFieldDefinition\r\n{\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n};\r\n\r\nvar lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(leadTypeLookup);\r\n});\r\n\r\nvar leadRecords = new ListDefinition\r\n{\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n};\r\n\r\nvar leadRecordTypes = new ListDefinition\r\n{\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n};\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n});\r\n\r\n// 1. deploy lookup field without bindings\r\nDeployModel(lookupFieldModel);\r\n\r\n// 2. deploy lists\r\nDeployModel(webModel);\r\n\r\n// 3. update binding for the lookup field\r\n// LookupList/LookupListId could also be used\r\nleadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n// 4. deploy lookup field again, so that it will be binded\r\nDeployModel(lookupFieldModel);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n CanDeployLookupFieldBindedToList\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests.CanDeployLookupFieldBindedToList\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add managed account\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleManagedAccountDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ManagedAccountDefinitionTests\r\n CanDeploySimpleManagedAccountDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ManagedAccountDefinitionTests.CanDeploySimpleManagedAccountDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ManagedAccountDefinitionTests\r\n 0\r\n ManagedAccountDefinitionTests.cs\r\n ManagedAccountDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ManagedAccountDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n \r\n \r\n \r\n Add master page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var masterPage = new MasterPageDefinition\r\n{\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MasterPageDefinitionTests\r\n CanDeploySimpleMasterPageDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests.CanDeploySimpleMasterPageDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests\r\n 0\r\n MasterPageDefinitionTests.cs\r\n MasterPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MasterPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n \r\n \r\n \r\n Add master page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var masterPage = new MasterPageDefinition\r\n{\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MasterPageDefinitionTests\r\n CanDeploySimpleMasterPageDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests.CanDeploySimpleMasterPageDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests\r\n 0\r\n MasterPageDefinitionTests.cs\r\n MasterPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MasterPageDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Add master page setting\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebmasterPageSettings()\r\n {\r\n // BuiltInMasterPageDefinitions class could be used to refer OOTB master pages\r\n // BuiltInMasterPageDefinitions.Seattle \r\n // BuiltInMasterPageDefinitions.Oslo \r\n // BuiltInMasterPageDefinitions.Minimal \r\n\r\n var masterPageSettings = new MasterPageSettingsDefinition\r\n {\r\n // both should be site relative URLs\r\n SiteMasterPageUrl = \"/_catalogs/masterpage/oslo.master\",\r\n SystemMasterPageUrl = \"/_catalogs/masterpage/oslo.master\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddMasterPageSettings(masterPageSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // BuiltInMasterPageDefinitions class could be used to refer OOTB master pages\r\n// BuiltInMasterPageDefinitions.Seattle\r\n// BuiltInMasterPageDefinitions.Oslo\r\n// BuiltInMasterPageDefinitions.Minimal\r\n\r\nvar masterPageSettings = new MasterPageSettingsDefinition\r\n{\r\n // both should be site relative URLs\r\n SiteMasterPageUrl = \"/_catalogs/masterpage/oslo.master\",\r\n SystemMasterPageUrl = \"/_catalogs/masterpage/oslo.master\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddMasterPageSettings(masterPageSettings);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MasterPageSettingsDefinitionTests\r\n CanDeployWebmasterPageSettings\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageSettingsDefinitionTests.CanDeployWebmasterPageSettings\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageSettingsDefinitionTests\r\n 0\r\n MasterPageSettingsDefinitionTests.cs\r\n MasterPageSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MasterPageSettingsDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Module files\r\n \r\n \r\n \r\n Add module file to Style Library\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployModuleFilesToStyleLibrary()\r\n {\r\n var cssFile = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-styles.css\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\".m2-content { padding:10px; border:1px red solid; } \")\r\n };\r\n\r\n var jsFile = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-app.js\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\" alert(\'hello, m2!\'); \")\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list\r\n .AddModuleFile(cssFile)\r\n .AddModuleFile(jsFile);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var cssFile = new ModuleFileDefinition\r\n{\r\n FileName = \"m2-styles.css\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\".m2-content { padding:10px; border:1px red solid; } \")\r\n};\r\n\r\nvar jsFile = new ModuleFileDefinition\r\n{\r\n FileName = \"m2-app.js\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\" alert(\'hello, m2!\'); \")\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list\r\n .AddModuleFile(cssFile)\r\n .AddModuleFile(jsFile);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ModuleFileDefinitionTests\r\n CanDeployModuleFilesToStyleLibrary\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ModuleFileDefinitionTests.CanDeployModuleFilesToStyleLibrary\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ModuleFileDefinitionTests\r\n 0\r\n ModuleFileDefinitionTests.cs\r\n ModuleFileDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ModuleFileDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Module files\r\n \r\n \r\n \r\n Add module file to folder\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployModuleFilesToFolders()\r\n {\r\n var cssFile = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-red.css\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\".m2-red { color:red; } \")\r\n };\r\n\r\n var jsFile = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-logger-module.js\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\" function(msg) { console.log(msg); } \")\r\n };\r\n\r\n var cssFolder = new FolderDefinition\r\n {\r\n Name = \"m2-css\"\r\n };\r\n\r\n var jsFolder = new FolderDefinition\r\n {\r\n Name = \"m2-js\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list\r\n .AddFolder(cssFolder, folder =>\r\n {\r\n folder.AddModuleFile(cssFile);\r\n })\r\n .AddFolder(jsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jsFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var cssFile = new ModuleFileDefinition\r\n{\r\n FileName = \"m2-red.css\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\".m2-red { color:red; } \")\r\n};\r\n\r\nvar jsFile = new ModuleFileDefinition\r\n{\r\n FileName = \"m2-logger-module.js\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\" function(msg) { console.log(msg); } \")\r\n};\r\n\r\nvar cssFolder = new FolderDefinition\r\n{\r\n Name = \"m2-css\"\r\n};\r\n\r\nvar jsFolder = new FolderDefinition\r\n{\r\n Name = \"m2-js\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list\r\n .AddFolder(cssFolder, folder =>\r\n {\r\n folder.AddModuleFile(cssFile);\r\n })\r\n .AddFolder(jsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jsFile);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ModuleFileDefinitionTests\r\n CanDeployModuleFilesToFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ModuleFileDefinitionTests.CanDeployModuleFilesToFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ModuleFileDefinitionTests\r\n 0\r\n ModuleFileDefinitionTests.cs\r\n ModuleFileDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ModuleFileDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add multichoice field\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n{\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddMultiChoiceField(fieldDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MultiChoiceFieldDefinitionTests\r\n CanDeploySimpleMultiChoiceFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests.CanDeploySimpleMultiChoiceFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests\r\n 0\r\n MultiChoiceFieldDefinitionTests.cs\r\n MultiChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MultiChoiceFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add note field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NoteFieldDefinitionTests\r\n CanDeploySimpleNoteFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests.CanDeploySimpleNoteFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests\r\n 0\r\n NoteFieldDefinitionTests.cs\r\n NoteFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NoteFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add number field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NumberFieldDefinitionTests\r\n CanDeploySimpleNumberFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests.CanDeploySimpleNumberFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests\r\n 0\r\n NumberFieldDefinitionTests.cs\r\n NumberFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NumberFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n Add prefix\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var prefixDef = new PrefixDefinition\r\n{\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n webApp.AddPrefix(prefixDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PrefixDefinitionTests\r\n CanDeploySimplePrefixDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests.CanDeploySimplePrefixDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests\r\n 0\r\n PrefixDefinitionTests.cs\r\n PrefixDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PrefixDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Add property to farm\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n var farmTag = new PropertyDefinition\r\n{\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n};\r\n\r\nvar farmType = new PropertyDefinition\r\n{\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n});\r\n\r\nDeploySSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderFarm\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderFarm\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Add property to site\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteTag = new PropertyDefinition\r\n{\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n};\r\n\r\nvar siteType = new PropertyDefinition\r\n{\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderSite\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderSite\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Add property to web\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var webTag = new PropertyDefinition\r\n{\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n};\r\n\r\nvar webType = new PropertyDefinition\r\n{\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Add property to list\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listTag = new PropertyDefinition\r\n{\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n};\r\n\r\nvar listType = new PropertyDefinition\r\n{\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n};\r\n\r\nvar listWithProperties = new ListDefinition\r\n{\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Add property to folder\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669 \r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var folderTag = new PropertyDefinition\r\n{\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n};\r\n\r\nvar folderType = new PropertyDefinition\r\n{\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n};\r\n\r\nvar listWithProperties = new ListDefinition\r\n{\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n};\r\n\r\nvar fodlerWithProperties = new FolderDefinition\r\n{\r\n Name = \"folder with properties\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669\r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add multichoice field\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n{\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddMultiChoiceField(fieldDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MultiChoiceFieldDefinitionTests\r\n CanDeploySimpleMultiChoiceFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests.CanDeploySimpleMultiChoiceFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests\r\n 0\r\n MultiChoiceFieldDefinitionTests.cs\r\n MultiChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MultiChoiceFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add note field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NoteFieldDefinitionTests\r\n CanDeploySimpleNoteFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests.CanDeploySimpleNoteFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests\r\n 0\r\n NoteFieldDefinitionTests.cs\r\n NoteFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NoteFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add number field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NumberFieldDefinitionTests\r\n CanDeploySimpleNumberFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests.CanDeploySimpleNumberFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests\r\n 0\r\n NumberFieldDefinitionTests.cs\r\n NumberFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NumberFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n Add prefix\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var prefixDef = new PrefixDefinition\r\n{\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n webApp.AddPrefix(prefixDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PrefixDefinitionTests\r\n CanDeploySimplePrefixDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests.CanDeploySimplePrefixDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests\r\n 0\r\n PrefixDefinitionTests.cs\r\n PrefixDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PrefixDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add property to farm\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n var farmTag = new PropertyDefinition\r\n{\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n};\r\n\r\nvar farmType = new PropertyDefinition\r\n{\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n});\r\n\r\nDeploySSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderFarm\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderFarm\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add property to site\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteTag = new PropertyDefinition\r\n{\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n};\r\n\r\nvar siteType = new PropertyDefinition\r\n{\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderSite\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderSite\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add property to web\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var webTag = new PropertyDefinition\r\n{\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n};\r\n\r\nvar webType = new PropertyDefinition\r\n{\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add property to list\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listTag = new PropertyDefinition\r\n{\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n};\r\n\r\nvar listType = new PropertyDefinition\r\n{\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n};\r\n\r\nvar listWithProperties = new ListDefinition\r\n{\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add property to folder\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669 \r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var folderTag = new PropertyDefinition\r\n{\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n};\r\n\r\nvar folderType = new PropertyDefinition\r\n{\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n};\r\n\r\nvar listWithProperties = new ListDefinition\r\n{\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n};\r\n\r\nvar fodlerWithProperties = new FolderDefinition\r\n{\r\n Name = \"folder with properties\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669\r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n \r\n \r\n \r\n Add quick nav items\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CaDeployFlatQuickLaunchNavigation()\r\n {\r\n var aboutUs = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"About us\",\r\n Url = \"about-us.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var services = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Services\",\r\n Url = \"services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var contacts = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Contacts\",\r\n Url = \"contacts.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddQuickLaunchNavigationNode(aboutUs)\r\n .AddQuickLaunchNavigationNode(services)\r\n .AddQuickLaunchNavigationNode(contacts);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var aboutUs = new QuickLaunchNavigationNodeDefinition\r\n{\r\n Title = \"About us\",\r\n Url = \"about-us.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar services = new QuickLaunchNavigationNodeDefinition\r\n{\r\n Title = \"Services\",\r\n Url = \"services.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar contacts = new QuickLaunchNavigationNodeDefinition\r\n{\r\n Title = \"Contacts\",\r\n Url = \"contacts.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddQuickLaunchNavigationNode(aboutUs)\r\n .AddQuickLaunchNavigationNode(services)\r\n .AddQuickLaunchNavigationNode(contacts);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n QuickLaunchNavigationNodeDefinitionTests\r\n CaDeployFlatQuickLaunchNavigation\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.QuickLaunchNavigationNodeDefinitionTests.CaDeployFlatQuickLaunchNavigation\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.QuickLaunchNavigationNodeDefinitionTests\r\n 0\r\n QuickLaunchNavigationNodeDefinitionTests.cs\r\n QuickLaunchNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\QuickLaunchNavigationNodeDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n \r\n \r\n \r\n Add hierarchical quick nav items\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalQuickLaunchNavigation()\r\n {\r\n // top level departments node\r\n var departments = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Departments\",\r\n Url = \"departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"HR\",\r\n Url = \"hr.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"IT\",\r\n Url = \"it.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var clients = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Clients\",\r\n Url = \"clients.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddQuickLaunchNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddQuickLaunchNavigationNode(hr)\r\n .AddQuickLaunchNavigationNode(it);\r\n })\r\n .AddQuickLaunchNavigationNode(clients, node =>\r\n {\r\n node\r\n .AddQuickLaunchNavigationNode(microsoft)\r\n .AddQuickLaunchNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // top level departments node\r\nvar departments = new QuickLaunchNavigationNodeDefinition\r\n{\r\n Title = \"Departments\",\r\n Url = \"departments.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar hr = new QuickLaunchNavigationNodeDefinition\r\n{\r\n Title = \"HR\",\r\n Url = \"hr.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar it = new QuickLaunchNavigationNodeDefinition\r\n{\r\n Title = \"IT\",\r\n Url = \"it.aspx\",\r\n IsExternal = true\r\n};\r\n\r\n// top level clients node\r\nvar clients = new QuickLaunchNavigationNodeDefinition\r\n{\r\n Title = \"Clients\",\r\n Url = \"clients.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar microsoft = new QuickLaunchNavigationNodeDefinition\r\n{\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar apple = new QuickLaunchNavigationNodeDefinition\r\n{\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddQuickLaunchNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddQuickLaunchNavigationNode(hr)\r\n .AddQuickLaunchNavigationNode(it);\r\n })\r\n .AddQuickLaunchNavigationNode(clients, node =>\r\n {\r\n node\r\n .AddQuickLaunchNavigationNode(microsoft)\r\n .AddQuickLaunchNavigationNode(apple);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n QuickLaunchNavigationNodeDefinitionTests\r\n CaDeployHierarchicalQuickLaunchNavigation\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.QuickLaunchNavigationNodeDefinitionTests.CaDeployHierarchicalQuickLaunchNavigation\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.QuickLaunchNavigationNodeDefinitionTests\r\n 0\r\n QuickLaunchNavigationNodeDefinitionTests.cs\r\n QuickLaunchNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\QuickLaunchNavigationNodeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add regional settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RegionalSettingsDefinitionTests\r\n CanDeploySimpleRegionalSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests.CanDeploySimpleRegionalSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests\r\n 0\r\n RegionalSettingsDefinitionTests.cs\r\n RegionalSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RegionalSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Remove fields from content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customName = new TextFieldDefinition\r\n{\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n};\r\n\r\nvar customObjectContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n CanRemoveContentTypeFieldLink\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests.CanRemoveContentTypeFieldLink\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests\r\n 0\r\n RemoveContentTypeFieldLinksDefinitionTests.cs\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeFieldLinksDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Remove content types from lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var defaultReport = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar defaultReportsList = new ListDefinition\r\n{\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(defaultReport);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeLinksDefinitionTests\r\n CanRemoveContentTypeFromList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests.CanRemoveContentTypeFromList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests\r\n 0\r\n RemoveContentTypeLinksDefinitionTests.cs\r\n RemoveContentTypeLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeLinksDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Reset role inheritance on list\r\n \r\n \r\n \r\n\r\n\r\n \r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listDef = new ListDefinition\r\n{\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n CanDeployResetRoleInheritanceDefinition_OnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests.CanDeployResetRoleInheritanceDefinition_OnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Reset role inheritance on web\r\n \r\n \r\n \r\n\r\n\r\n \r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var publicProjectWebDef = new WebDefinition\r\n{\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n CanDeployResetRoleInheritanceDefinition_OnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests.CanDeployResetRoleInheritanceDefinition_OnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add regional settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RegionalSettingsDefinitionTests\r\n CanDeploySimpleRegionalSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests.CanDeploySimpleRegionalSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests\r\n 0\r\n RegionalSettingsDefinitionTests.cs\r\n RegionalSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RegionalSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Remove fields from content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customName = new TextFieldDefinition\r\n{\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n};\r\n\r\nvar customObjectContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n CanRemoveContentTypeFieldLink\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests.CanRemoveContentTypeFieldLink\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests\r\n 0\r\n RemoveContentTypeFieldLinksDefinitionTests.cs\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeFieldLinksDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Remove content types from lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var defaultReport = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar defaultReportsList = new ListDefinition\r\n{\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(defaultReport);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeLinksDefinitionTests\r\n CanRemoveContentTypeFromList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests.CanRemoveContentTypeFromList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests\r\n 0\r\n RemoveContentTypeLinksDefinitionTests.cs\r\n RemoveContentTypeLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeLinksDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Reset role inheritance on list\r\n \r\n \r\n \r\n\r\n\r\n \r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listDef = new ListDefinition\r\n{\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n CanDeployResetRoleInheritanceDefinition_OnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests.CanDeployResetRoleInheritanceDefinition_OnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Reset role inheritance on web\r\n \r\n \r\n \r\n\r\n\r\n \r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var publicProjectWebDef = new WebDefinition\r\n{\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n CanDeployResetRoleInheritanceDefinition_OnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests.CanDeployResetRoleInheritanceDefinition_OnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Root web\r\n \r\n \r\n \r\n Update root web Title/Description\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanUpdateRootWebProperties()\r\n {\r\n var rootWeb = new RootWebDefinition\r\n {\r\n Title = \"M2 CRM\",\r\n Description = \"Custom CRM application build on top of M2 framework.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddRootWeb(rootWeb);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var rootWeb = new RootWebDefinition\r\n{\r\n Title = \"M2 CRM\",\r\n Description = \"Custom CRM application build on top of M2 framework.\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddRootWeb(rootWeb);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RootWebDefinitionTests\r\n CanUpdateRootWebProperties\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RootWebDefinitionTests.CanUpdateRootWebProperties\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RootWebDefinitionTests\r\n 0\r\n RootWebDefinitionTests.cs\r\n RootWebDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RootWebDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Root web\r\n \r\n \r\n \r\n Add lists to root web\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanProvisionRootWebLists()\r\n {\r\n var rootWeb = new RootWebDefinition\r\n {\r\n\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddRootWeb(rootWeb, web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff with \'Style Library\'\r\n })\r\n .AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff with \'Master Page Library\'\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var rootWeb = new RootWebDefinition\r\n{\r\n\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddRootWeb(rootWeb, web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff with \'Style Library\'\r\n })\r\n .AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff with \'Master Page Library\'\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RootWebDefinitionTests\r\n CanProvisionRootWebLists\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RootWebDefinitionTests.CanProvisionRootWebLists\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RootWebDefinitionTests\r\n 0\r\n RootWebDefinitionTests.cs\r\n RootWebDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RootWebDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add sandbox solution\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n \r\n // Content is a byte array, so get ot from whatever source you want\r\n \r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n \r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // FileName could be different to the original solution name\r\n// FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n\r\n// Content is a byte array, so get ot from whatever source you want\r\n\r\n// SolutionId is used to lookup existing sandbox package\r\n// get SolutionId from the VS project or XML inside WSP package\r\n\r\n// Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\nvar myBranding = new SandboxSolutionDefinition\r\n{\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n};\r\n\r\nvar myTasks = new SandboxSolutionDefinition\r\n{\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SandboxSolutionDefinitionTests\r\n CanDeploySimpleSandboxSolutionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests.CanDeploySimpleSandboxSolutionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests\r\n 0\r\n SandboxSolutionDefinitionTests.cs\r\n SandboxSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SandboxSolutionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add Script Editor web part\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n{\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n CanDeploySimpleScriptEditorWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests.CanDeploySimpleScriptEditorWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add Script Editor web part with content\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n{\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n CanDeployScriptEditorWebPartwithContent\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests.CanDeployScriptEditorWebPartwithContent\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add secure store application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecureStoreApplicationDefinitionTests\r\n CanDeploySimpleSecureStoreApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests.CanDeploySimpleSecureStoreApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests\r\n 0\r\n SecureStoreApplicationDefinitionTests.cs\r\n SecureStoreApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecureStoreApplicationDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add security group\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\nvar reviewers = new SecurityGroupDefinition\r\n{\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n CanDeploySimpleSecurityGroup\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests.CanDeploySimpleSecurityGroup\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add multiple security groups\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n CanDeploySimpleSecurityGroups\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests.CanDeploySimpleSecurityGroups\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Assign security group to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\n// add group to the site first\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(auditors);\r\n});\r\n\r\n// assign group to the web, via .AddSecurityGroupLink() method\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n CanDeploySimpleSecurityGroupLinkDefinitionToWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests.CanDeploySimpleSecurityGroupLinkDefinitionToWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Assign security group to list\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\nvar auditorsList = new ListDefinition\r\n{\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n};\r\n\r\n// add group to the site first\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(auditors);\r\n});\r\n\r\n// assign group to the list, via .AddSecurityGroupLink() method\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n CanDeploySimpleSecurityGroupLinkDefinitionToList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests.CanDeploySimpleSecurityGroupLinkDefinitionToList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Add security role\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customerEditors = new SecurityRoleDefinition\r\n{\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n};\r\n\r\nvar customerApprovers = new SecurityRoleDefinition\r\n{\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityRoleDefinitionTests\r\n CanDeploySimpleSecurityRoleDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests.CanDeploySimpleSecurityRoleDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests\r\n 0\r\n SecurityRoleDefinitionTests.cs\r\n SecurityRoleDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityRoleDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add sandbox solution\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n \r\n // Content is a byte array, so get ot from whatever source you want\r\n \r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n \r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // FileName could be different to the original solution name\r\n// FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n\r\n// Content is a byte array, so get ot from whatever source you want\r\n\r\n// SolutionId is used to lookup existing sandbox package\r\n// get SolutionId from the VS project or XML inside WSP package\r\n\r\n// Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\nvar myBranding = new SandboxSolutionDefinition\r\n{\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n};\r\n\r\nvar myTasks = new SandboxSolutionDefinition\r\n{\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SandboxSolutionDefinitionTests\r\n CanDeploySimpleSandboxSolutionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests.CanDeploySimpleSandboxSolutionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests\r\n 0\r\n SandboxSolutionDefinitionTests.cs\r\n SandboxSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SandboxSolutionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add Script Editor web part\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n{\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n CanDeploySimpleScriptEditorWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests.CanDeploySimpleScriptEditorWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add Script Editor web part with content\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n{\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n CanDeployScriptEditorWebPartwithContent\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests.CanDeployScriptEditorWebPartwithContent\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add secure store application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecureStoreApplicationDefinitionTests\r\n CanDeploySimpleSecureStoreApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests.CanDeploySimpleSecureStoreApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests\r\n 0\r\n SecureStoreApplicationDefinitionTests.cs\r\n SecureStoreApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecureStoreApplicationDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Add security group\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\nvar reviewers = new SecurityGroupDefinition\r\n{\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n CanDeploySimpleSecurityGroup\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests.CanDeploySimpleSecurityGroup\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Add multiple security groups\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n CanDeploySimpleSecurityGroups\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests.CanDeploySimpleSecurityGroups\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Assign security group to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\n// add group to the site first\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(auditors);\r\n});\r\n\r\n// assign group to the web, via .AddSecurityGroupLink() method\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n CanDeploySimpleSecurityGroupLinkDefinitionToWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests.CanDeploySimpleSecurityGroupLinkDefinitionToWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Assign security group to list\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\nvar auditorsList = new ListDefinition\r\n{\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n};\r\n\r\n// add group to the site first\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(auditors);\r\n});\r\n\r\n// assign group to the list, via .AddSecurityGroupLink() method\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n CanDeploySimpleSecurityGroupLinkDefinitionToList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests.CanDeploySimpleSecurityGroupLinkDefinitionToList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add security role\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customerEditors = new SecurityRoleDefinition\r\n{\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n};\r\n\r\nvar customerApprovers = new SecurityRoleDefinition\r\n{\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityRoleDefinitionTests\r\n CanDeploySimpleSecurityRoleDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests.CanDeploySimpleSecurityRoleDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests\r\n 0\r\n SecurityRoleDefinitionTests.cs\r\n SecurityRoleDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityRoleDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Add security role link\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n\r\n public void CanDeploySimpleSecurityRoleLinkDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityRoleLinkDefinitionTests\r\n CanDeploySimpleSecurityRoleLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleLinkDefinitionTests.CanDeploySimpleSecurityRoleLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleLinkDefinitionTests\r\n 0\r\n SecurityRoleLinkDefinitionTests.cs\r\n SecurityRoleLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityRoleLinkDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add site\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteDefinitionTests\r\n CanDeploySimpleSiteDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests.CanDeploySimpleSiteDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests\r\n 0\r\n SiteDefinitionTests.cs\r\n SiteDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SiteDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Add site\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteDefinitionTests\r\n CanDeploySimpleSiteDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests.CanDeploySimpleSiteDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests\r\n 0\r\n SiteDefinitionTests.cs\r\n SiteDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SiteDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n SharePoint 2013 workflow\r\n \r\n \r\n \r\n Add SP2013 workflow\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSP2013WorkflowDefinition()\r\n {\r\n var writeToHistoryLstWorkflow = new SP2013WorkflowDefinition\r\n {\r\n DisplayName = \"M2 - Write to history list\",\r\n Override = true,\r\n Xaml = WorkflowTemplates.WriteToHistoryListWorkflow\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddSP2013Workflow(writeToHistoryLstWorkflow);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var writeToHistoryLstWorkflow = new SP2013WorkflowDefinition\r\n{\r\n DisplayName = \"M2 - Write to history list\",\r\n Override = true,\r\n Xaml = WorkflowTemplates.WriteToHistoryListWorkflow\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddSP2013Workflow(writeToHistoryLstWorkflow);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SP2013WorkflowDefinitionTests\r\n CanDeploySimpleSP2013WorkflowDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SP2013WorkflowDefinitionTests.CanDeploySimpleSP2013WorkflowDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SP2013WorkflowDefinitionTests\r\n 0\r\n SP2013WorkflowDefinitionTests.cs\r\n SP2013WorkflowDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SP2013WorkflowDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n SharePoint 2013 workflow\r\n \r\n \r\n \r\n Add SP2013 workflow to web\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSP2013WorkflowSubscriptionToWeb()\r\n {\r\n var writeToHistoryListWorkflow = new SP2013WorkflowDefinition\r\n {\r\n DisplayName = \"M2 - Write to history list\",\r\n Override = true,\r\n Xaml = WorkflowTemplates.WriteToHistoryListWorkflow\r\n };\r\n\r\n var taskList = new ListDefinition\r\n {\r\n Title = \"Write To History List Tasks\",\r\n TemplateType = BuiltInListTemplateTypeId.Tasks,\r\n Url = \"m2WriteToHistoryListTasks\"\r\n };\r\n\r\n var historyList = new ListDefinition\r\n {\r\n Title = \"Write To History List History\",\r\n TemplateType = BuiltInListTemplateTypeId.WorkflowHistory,\r\n Url = \"m2WriteToHistoryListHistory\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddSP2013Workflow(writeToHistoryListWorkflow)\r\n .AddList(historyList)\r\n .AddList(taskList)\r\n .AddSP2013WorkflowSubscription(new SP2013WorkflowSubscriptionDefinition\r\n {\r\n Name = \"Write To History Web Workflow\",\r\n WorkflowDisplayName = writeToHistoryListWorkflow.DisplayName,\r\n HistoryListUrl = historyList.GetListUrl(),\r\n TaskListUrl = taskList.GetListUrl()\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var writeToHistoryListWorkflow = new SP2013WorkflowDefinition\r\n{\r\n DisplayName = \"M2 - Write to history list\",\r\n Override = true,\r\n Xaml = WorkflowTemplates.WriteToHistoryListWorkflow\r\n};\r\n\r\nvar taskList = new ListDefinition\r\n{\r\n Title = \"Write To History List Tasks\",\r\n TemplateType = BuiltInListTemplateTypeId.Tasks,\r\n Url = \"m2WriteToHistoryListTasks\"\r\n};\r\n\r\nvar historyList = new ListDefinition\r\n{\r\n Title = \"Write To History List History\",\r\n TemplateType = BuiltInListTemplateTypeId.WorkflowHistory,\r\n Url = \"m2WriteToHistoryListHistory\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddSP2013Workflow(writeToHistoryListWorkflow)\r\n .AddList(historyList)\r\n .AddList(taskList)\r\n .AddSP2013WorkflowSubscription(new SP2013WorkflowSubscriptionDefinition\r\n {\r\n Name = \"Write To History Web Workflow\",\r\n WorkflowDisplayName = writeToHistoryListWorkflow.DisplayName,\r\n HistoryListUrl = historyList.GetListUrl(),\r\n TaskListUrl = taskList.GetListUrl()\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n SP2013WorkflowSubscriptionDefinitionTests\r\n CanDeploySimpleSP2013WorkflowSubscriptionToWeb\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.SP2013WorkflowSubscriptionDefinitionTests.CanDeploySimpleSP2013WorkflowSubscriptionToWeb\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.SP2013WorkflowSubscriptionDefinitionTests\r\n 0\r\n SP2013WorkflowSubscriptionDefinitionTests.cs\r\n SP2013WorkflowSubscriptionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SP2013WorkflowSubscriptionDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n SharePoint 2013 workflow\r\n \r\n \r\n \r\n Add SP2013 workflow to list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSP2013WorkflowSubscriptionToList()\r\n {\r\n var writeToHistoryListWorkflow = new SP2013WorkflowDefinition\r\n {\r\n DisplayName = \"M2 - Write to history list\",\r\n Override = true,\r\n Xaml = WorkflowTemplates.WriteToHistoryListWorkflow\r\n };\r\n\r\n var taskList = new ListDefinition\r\n {\r\n Title = \"Workflow Enabled List Tasks\",\r\n TemplateType = BuiltInListTemplateTypeId.Tasks,\r\n Url = \"m2WorkflowEnabledListTasks\"\r\n };\r\n\r\n var historyList = new ListDefinition\r\n {\r\n Title = \"Workflow Enabled List History\",\r\n TemplateType = BuiltInListTemplateTypeId.WorkflowHistory,\r\n Url = \"m2WorkflowEnabledListHistory\"\r\n };\r\n\r\n var workflowEnabledList = new ListDefinition\r\n {\r\n Title = \"Workflow Enabled List\",\r\n Description = \"Workflow enabled list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"WorkflowEnabledList\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddSP2013Workflow(writeToHistoryListWorkflow)\r\n .AddList(historyList)\r\n .AddList(taskList)\r\n .AddList(workflowEnabledList, list =>\r\n {\r\n list\r\n .AddSP2013WorkflowSubscription(new SP2013WorkflowSubscriptionDefinition\r\n {\r\n Name = \"Write To History List Workflow\",\r\n WorkflowDisplayName = writeToHistoryListWorkflow.DisplayName,\r\n HistoryListUrl = historyList.GetListUrl(),\r\n TaskListUrl = taskList.GetListUrl()\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var writeToHistoryListWorkflow = new SP2013WorkflowDefinition\r\n{\r\n DisplayName = \"M2 - Write to history list\",\r\n Override = true,\r\n Xaml = WorkflowTemplates.WriteToHistoryListWorkflow\r\n};\r\n\r\nvar taskList = new ListDefinition\r\n{\r\n Title = \"Workflow Enabled List Tasks\",\r\n TemplateType = BuiltInListTemplateTypeId.Tasks,\r\n Url = \"m2WorkflowEnabledListTasks\"\r\n};\r\n\r\nvar historyList = new ListDefinition\r\n{\r\n Title = \"Workflow Enabled List History\",\r\n TemplateType = BuiltInListTemplateTypeId.WorkflowHistory,\r\n Url = \"m2WorkflowEnabledListHistory\"\r\n};\r\n\r\nvar workflowEnabledList = new ListDefinition\r\n{\r\n Title = \"Workflow Enabled List\",\r\n Description = \"Workflow enabled list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"WorkflowEnabledList\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddSP2013Workflow(writeToHistoryListWorkflow)\r\n .AddList(historyList)\r\n .AddList(taskList)\r\n .AddList(workflowEnabledList, list =>\r\n {\r\n list\r\n .AddSP2013WorkflowSubscription(new SP2013WorkflowSubscriptionDefinition\r\n {\r\n Name = \"Write To History List Workflow\",\r\n WorkflowDisplayName = writeToHistoryListWorkflow.DisplayName,\r\n HistoryListUrl = historyList.GetListUrl(),\r\n TaskListUrl = taskList.GetListUrl()\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n SP2013WorkflowSubscriptionDefinitionTests\r\n CanDeploySimpleSP2013WorkflowSubscriptionToList\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.SP2013WorkflowSubscriptionDefinitionTests.CanDeploySimpleSP2013WorkflowSubscriptionToList\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.SP2013WorkflowSubscriptionDefinitionTests\r\n 0\r\n SP2013WorkflowSubscriptionDefinitionTests.cs\r\n SP2013WorkflowSubscriptionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SP2013WorkflowSubscriptionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add Target Application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TargetApplicationDefinitionTests\r\n CanDeploySimpleTargetApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests.CanDeploySimpleTargetApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests\r\n 0\r\n TargetApplicationDefinitionTests.cs\r\n TargetApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TargetApplicationDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add text field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TextFieldDefinitionTests\r\n CanDeploySimpleTextFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests.CanDeploySimpleTextFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests\r\n 0\r\n TextFieldDefinitionTests.cs\r\n TextFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TextFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n \r\n \r\n \r\n Add top nav items\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var ourCompany = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar ourServices = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar ourTeam = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n CaDeployFlatTopNavigation\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests.CaDeployFlatTopNavigation\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n \r\n \r\n \r\n Add hierarchical top nav items\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // top level departments node\r\nvar departments = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar hr = new TopNavigationNodeDefinition\r\n{\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar it = new TopNavigationNodeDefinition\r\n{\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\n// top level clients node\r\nvar partners = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar microsoft = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar apple = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n CaDeployHierarchicalTopNavigation\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests.CaDeployHierarchicalTopNavigation\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add tree view settings to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n{\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddTreeViewSettings(treeViewSettings);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TreeViewSettingsDefinitionTests\r\n CanDeploySimpleTreeViewSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests.CanDeploySimpleTreeViewSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests\r\n 0\r\n TreeViewSettingsDefinitionTests.cs\r\n TreeViewSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TreeViewSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Reorder content type fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var debitField = new NumberFieldDefinition\r\n{\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n};\r\n\r\nvar creditField = new NumberFieldDefinition\r\n{\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n};\r\n\r\nvar totalField = new NumberFieldDefinition\r\n{\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n};\r\n\r\nvar balanceContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n CanReorderContentTypeFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests.CanReorderContentTypeFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests\r\n 0\r\n UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Reorder content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var creditContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar debitContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar totalContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar annualRevenueList = new ListDefinition\r\n{\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeOrderDefinitionTests\r\n CanReorderContentTypesInList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests.CanReorderContentTypesInList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests\r\n 0\r\n UniqueContentTypeOrderDefinitionTests.cs\r\n UniqueContentTypeOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeOrderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add URL field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n URLFieldDefinitionTests\r\n CanDeploySimpleURLFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests.CanDeploySimpleURLFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests\r\n 0\r\n URLFieldDefinitionTests.cs\r\n URLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\URLFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Add custom action to site\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddUserCustomAction(siteLogger);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionUnderSite\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionUnderSite\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Add custom action with jQuery\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var jQueryFile = new ModuleFileDefinition\r\n{\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n};\r\n\r\nvar appScriptsFolder = new FolderDefinition\r\n{\r\n Name = \"M2 App Scripts\"\r\n};\r\n\r\nvar jQueryCustomAction = new UserCustomActionDefinition\r\n{\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n};\r\n\r\nvar jQuerySiteLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionWithJquery\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionWithJquery\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Add custom action to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var webLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n};\r\n\r\nvar loggerWeb = new WebDefinition\r\n{\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionOnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionOnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Add custom action to list\r\n \r\n \r\n \r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n // TODO\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionOnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionOnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add Target Application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TargetApplicationDefinitionTests\r\n CanDeploySimpleTargetApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests.CanDeploySimpleTargetApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests\r\n 0\r\n TargetApplicationDefinitionTests.cs\r\n TargetApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TargetApplicationDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add text field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TextFieldDefinitionTests\r\n CanDeploySimpleTextFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests.CanDeploySimpleTextFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests\r\n 0\r\n TextFieldDefinitionTests.cs\r\n TextFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TextFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n \r\n \r\n \r\n Add top nav items\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var ourCompany = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar ourServices = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar ourTeam = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n CaDeployFlatTopNavigation\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests.CaDeployFlatTopNavigation\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n \r\n \r\n \r\n Add hierarchical top nav items\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // top level departments node\r\nvar departments = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar hr = new TopNavigationNodeDefinition\r\n{\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar it = new TopNavigationNodeDefinition\r\n{\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\n// top level clients node\r\nvar partners = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar microsoft = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar apple = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n CaDeployHierarchicalTopNavigation\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests.CaDeployHierarchicalTopNavigation\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Add tree view settings to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n{\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddTreeViewSettings(treeViewSettings);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TreeViewSettingsDefinitionTests\r\n CanDeploySimpleTreeViewSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests.CanDeploySimpleTreeViewSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests\r\n 0\r\n TreeViewSettingsDefinitionTests.cs\r\n TreeViewSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TreeViewSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Reorder content type fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var debitField = new NumberFieldDefinition\r\n{\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n};\r\n\r\nvar creditField = new NumberFieldDefinition\r\n{\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n};\r\n\r\nvar totalField = new NumberFieldDefinition\r\n{\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n};\r\n\r\nvar balanceContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n CanReorderContentTypeFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests.CanReorderContentTypeFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests\r\n 0\r\n UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Reorder content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var creditContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar debitContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar totalContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar annualRevenueList = new ListDefinition\r\n{\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeOrderDefinitionTests\r\n CanReorderContentTypesInList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests.CanReorderContentTypesInList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests\r\n 0\r\n UniqueContentTypeOrderDefinitionTests.cs\r\n UniqueContentTypeOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeOrderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add URL field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n URLFieldDefinitionTests\r\n CanDeploySimpleURLFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests.CanDeploySimpleURLFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests\r\n 0\r\n URLFieldDefinitionTests.cs\r\n URLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\URLFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add custom action to site\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddUserCustomAction(siteLogger);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionUnderSite\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionUnderSite\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add custom action with jQuery\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var jQueryFile = new ModuleFileDefinition\r\n{\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n};\r\n\r\nvar appScriptsFolder = new FolderDefinition\r\n{\r\n Name = \"M2 App Scripts\"\r\n};\r\n\r\nvar jQueryCustomAction = new UserCustomActionDefinition\r\n{\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n};\r\n\r\nvar jQuerySiteLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionWithJquery\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionWithJquery\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add custom action to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var webLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n};\r\n\r\nvar loggerWeb = new WebDefinition\r\n{\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionOnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionOnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add custom action to list\r\n \r\n \r\n \r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n // TODO\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionOnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionOnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add user field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleUserFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserFieldDefinitionTests\r\n CanDeploySimpleUserFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserFieldDefinitionTests.CanDeploySimpleUserFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserFieldDefinitionTests\r\n 0\r\n UserFieldDefinitionTests.cs\r\n UserFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add web application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebApplicationDefinitionTests\r\n CanDeploySimpleWebApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests.CanDeploySimpleWebApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests\r\n 0\r\n WebApplicationDefinitionTests.cs\r\n WebApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebApplicationDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Add web.config modification\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebConfigModificationDefinitionTests\r\n CanDeploySimpleWebConfigModificationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests.CanDeploySimpleWebConfigModificationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests\r\n 0\r\n WebConfigModificationDefinitionTests.cs\r\n WebConfigModificationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebConfigModificationDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add web application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebApplicationDefinitionTests\r\n CanDeploySimpleWebApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests.CanDeploySimpleWebApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests\r\n 0\r\n WebApplicationDefinitionTests.cs\r\n WebApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebApplicationDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n Add web.config modification\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebConfigModificationDefinitionTests\r\n CanDeploySimpleWebConfigModificationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests.CanDeploySimpleWebConfigModificationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests\r\n 0\r\n WebConfigModificationDefinitionTests.cs\r\n WebConfigModificationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebConfigModificationDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add web\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWeb()\r\n {\r\n var newCustomerWeb = new WebDefinition\r\n {\r\n Title = \"New customer site\",\r\n Description = \"A dedicated site for the customer support.\",\r\n Url = \"new-customer-web\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n var newPublishingWeb = new WebDefinition\r\n {\r\n Title = \"Temporary Publishing Web\",\r\n Description = \"A temporary punlishing web.\",\r\n Url = \"new-publishing-web\",\r\n WebTemplate = BuiltInWebTemplates.Publishing.PublishingPortal\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(newCustomerWeb);\r\n web.AddWeb(newPublishingWeb);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newCustomerWeb = new WebDefinition\r\n{\r\n Title = \"New customer site\",\r\n Description = \"A dedicated site for the customer support.\",\r\n Url = \"new-customer-web\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\nvar newPublishingWeb = new WebDefinition\r\n{\r\n Title = \"Temporary Publishing Web\",\r\n Description = \"A temporary punlishing web.\",\r\n Url = \"new-publishing-web\",\r\n WebTemplate = BuiltInWebTemplates.Publishing.PublishingPortal\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(newCustomerWeb);\r\n web.AddWeb(newPublishingWeb);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebDefinitionTest\r\n CanDeploySimpleWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebDefinitionTest.CanDeploySimpleWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebDefinitionTest\r\n 0\r\n WebDefinitionTests.cs\r\n WebDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add multiple webs\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebs()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(DocWebs.News);\r\n web.AddWeb(DocWebs.AboutOurCompany);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(DocWebs.News);\r\n web.AddWeb(DocWebs.AboutOurCompany);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebDefinitionTest\r\n CanDeploySimpleWebs\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebDefinitionTest.CanDeploySimpleWebs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebDefinitionTest\r\n 0\r\n WebDefinitionTests.cs\r\n WebDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add hierarchical webs\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployHierarchicalWebs()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.News)\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddWeb(DocWebs.DepartmentWebs.HR)\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDesk, itWeb =>\r\n {\r\n itWeb\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDeskWebs.Apple)\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDeskWebs.Cisco)\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDeskWebs.Microsoft);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.Sales);\r\n })\r\n .AddWeb(DocWebs.AboutOurCompany);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWeb(DocWebs.News)\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddWeb(DocWebs.DepartmentWebs.HR)\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDesk, itWeb =>\r\n {\r\n itWeb\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDeskWebs.Apple)\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDeskWebs.Cisco)\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDeskWebs.Microsoft);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.Sales);\r\n })\r\n .AddWeb(DocWebs.AboutOurCompany);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebDefinitionTest\r\n CanDeployHierarchicalWebs\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebDefinitionTest.CanDeployHierarchicalWebs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebDefinitionTest\r\n 0\r\n WebDefinitionTests.cs\r\n WebDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part by type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n // this would deploy a web part using WebpartType prop\r\n// you need to provide AssemblyQualifiedName of the target web part type\r\n// M2 would use reflection to create an instane of the web part in the runtime\r\n// that works only for SSOM, not CSOM support yet\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeploySSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByWebpartType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByWebpartType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part by XML\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n// you need to provide an XML template which you get from SharePoint\r\n// export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n// here is a web part XML template\r\n// usually, you export that XML from SharePoint page, but M2 has pre-build class\r\nvar contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByXML\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByXML\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part from Gallery File\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // this would deploy the web part using WebpartFileName\r\n// you need to provide a file name ofthe web part template in the web part gallery\r\n// M2 would load this file, then use an XML as a web part template\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByWebpartGalleryFileName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByWebpartGalleryFileName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part with pre-configured XML\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n// here is a web part XML template\r\n// usually, you export that XML from SharePoint page, but M2 has pre-build class\r\nvar contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n// let\' set new some properties, shall we?\r\n// we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n// it works well web both V2/V3 web part XML\r\n// then change properties and seehow it goes\r\n// then call ToString() to get string out of XML\r\nvar wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployCSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartWithPreprocessedXML\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartWithPreprocessedXML\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add web part page\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n \r\n \r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customersReportPage = new WebPartPageDefinition\r\n{\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar parthesReportPage = new WebPartPageDefinition\r\n{\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPages\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPages\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add custom web part page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPageWithCustomTemplate\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPageWithCustomTemplate\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add web part page to folder\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // clients folder and pages\r\nvar clientsFolder = new FolderDefinition()\r\n{\r\n Name = \"Customers\"\r\n};\r\n\r\nvar clientMay2015Page = new WebPartPageDefinition\r\n{\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar clientJune2015Page = new WebPartPageDefinition\r\n{\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\n// parthers folder and pages\r\nvar parthersFolder = new FolderDefinition()\r\n{\r\n Name = \"Parthers\"\r\n};\r\n\r\nvar parther2014AnnualReport = new WebPartPageDefinition\r\n{\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar parther2015AnnualReport = new WebPartPageDefinition\r\n{\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n};\r\n\r\n// linking everything together\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPagesUnderFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPagesUnderFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add web welcome page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newWebHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add list welcome page\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newListHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add folder welcome page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newFolderHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n};\r\n\r\nvar landingPageFolder = new FolderDefinition\r\n{\r\n Name = \"A folder with custom landing page\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n \r\n \r\n \r\n Add wiki pages\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n CanDeploySimpleWikiPages\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests.CanDeploySimpleWikiPages\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n \r\n \r\n \r\n Add wiki pages to folders\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n CanDeployWikiPagesUnderFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests.CanDeployWikiPagesUnderFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var inventoryLibrary = new ListDefinition\r\n{\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list by URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var booksLibrary = new ListDefinition\r\n{\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list view by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var booksLibrary = new ListDefinition\r\n{\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n};\r\n\r\nvar booksView = new ListViewDefinition\r\n{\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListViewTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListViewTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add audience\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AudienceDefinitionTests\r\n CanDeploySimpleAudienceDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests.CanDeploySimpleAudienceDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests\r\n 0\r\n AudienceDefinitionTests.cs\r\n AudienceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\AudienceDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add contact field web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContactFieldControlDefinitionTests\r\n CanDeploySimpleContactFieldControlDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests.CanDeploySimpleContactFieldControlDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests\r\n 0\r\n ContactFieldControlDefinitionTests.cs\r\n ContactFieldControlDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContactFieldControlDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add CQWP web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentByQueryWebPartDefinitionTests\r\n CanDeploySimpleContentByQueryWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests.CanDeploySimpleContentByQueryWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests\r\n 0\r\n ContentByQueryWebPartDefinitionTests.cs\r\n ContentByQueryWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContentByQueryWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part by type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n // this would deploy a web part using WebpartType prop\r\n// you need to provide AssemblyQualifiedName of the target web part type\r\n// M2 would use reflection to create an instane of the web part in the runtime\r\n// that works only for SSOM, not CSOM support yet\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeploySSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByWebpartType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByWebpartType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part by XML\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n// you need to provide an XML template which you get from SharePoint\r\n// export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n// here is a web part XML template\r\n// usually, you export that XML from SharePoint page, but M2 has pre-build class\r\nvar contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByXML\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByXML\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part from Gallery File\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // this would deploy the web part using WebpartFileName\r\n// you need to provide a file name ofthe web part template in the web part gallery\r\n// M2 would load this file, then use an XML as a web part template\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByWebpartGalleryFileName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByWebpartGalleryFileName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part with pre-configured XML\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n// here is a web part XML template\r\n// usually, you export that XML from SharePoint page, but M2 has pre-build class\r\nvar contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n// let\' set new some properties, shall we?\r\n// we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n// it works well web both V2/V3 web part XML\r\n// then change properties and seehow it goes\r\n// then call ToString() to get string out of XML\r\nvar wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployCSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartWithPreprocessedXML\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartWithPreprocessedXML\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add web part page\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n \r\n \r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customersReportPage = new WebPartPageDefinition\r\n{\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar parthesReportPage = new WebPartPageDefinition\r\n{\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPages\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPages\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add custom web part page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPageWithCustomTemplate\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPageWithCustomTemplate\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add web part page to folder\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // clients folder and pages\r\nvar clientsFolder = new FolderDefinition()\r\n{\r\n Name = \"Customers\"\r\n};\r\n\r\nvar clientMay2015Page = new WebPartPageDefinition\r\n{\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar clientJune2015Page = new WebPartPageDefinition\r\n{\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\n// parthers folder and pages\r\nvar parthersFolder = new FolderDefinition()\r\n{\r\n Name = \"Parthers\"\r\n};\r\n\r\nvar parther2014AnnualReport = new WebPartPageDefinition\r\n{\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar parther2015AnnualReport = new WebPartPageDefinition\r\n{\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n};\r\n\r\n// linking everything together\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPagesUnderFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPagesUnderFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add web welcome page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newWebHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add list welcome page\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newListHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add folder welcome page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newFolderHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n};\r\n\r\nvar landingPageFolder = new FolderDefinition\r\n{\r\n Name = \"A folder with custom landing page\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n \r\n \r\n \r\n Add wiki pages\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n CanDeploySimpleWikiPages\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests.CanDeploySimpleWikiPages\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n \r\n \r\n \r\n Add wiki pages to folders\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n CanDeployWikiPagesUnderFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests.CanDeployWikiPagesUnderFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var inventoryLibrary = new ListDefinition\r\n{\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list by URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var booksLibrary = new ListDefinition\r\n{\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list view by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var booksLibrary = new ListDefinition\r\n{\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n};\r\n\r\nvar booksView = new ListViewDefinition\r\n{\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListViewTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListViewTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add audience\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AudienceDefinitionTests\r\n CanDeploySimpleAudienceDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests.CanDeploySimpleAudienceDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests\r\n 0\r\n AudienceDefinitionTests.cs\r\n AudienceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\AudienceDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add contact field web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContactFieldControlDefinitionTests\r\n CanDeploySimpleContactFieldControlDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests.CanDeploySimpleContactFieldControlDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests\r\n 0\r\n ContactFieldControlDefinitionTests.cs\r\n ContactFieldControlDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContactFieldControlDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add CQWP web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentByQueryWebPartDefinitionTests\r\n CanDeploySimpleContentByQueryWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests.CanDeploySimpleContentByQueryWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests\r\n 0\r\n ContentByQueryWebPartDefinitionTests.cs\r\n ContentByQueryWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContentByQueryWebPartDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n \r\n \r\n \r\n Add control display template\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleControlDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ControlDisplayTemplateDefinitionTests\r\n CanDeploySimpleControlDisplayTemplateDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ControlDisplayTemplateDefinitionTests.CanDeploySimpleControlDisplayTemplateDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ControlDisplayTemplateDefinitionTests\r\n 0\r\n ControlDisplayTemplateDefinitionTests.cs\r\n ControlDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ControlDisplayTemplateDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add Document ID provider\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CustomDocumentIdProviderDefinitionTests\r\n CanDeploySimpleCustomDocumentIdProviderDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests.CanDeploySimpleCustomDocumentIdProviderDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests\r\n 0\r\n CustomDocumentIdProviderDefinitionTests.cs\r\n CustomDocumentIdProviderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\CustomDocumentIdProviderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add HTML field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HTMLFieldDefinitionTests\r\n CanDeploySimpleHTMLFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests.CanDeploySimpleHTMLFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests\r\n 0\r\n HTMLFieldDefinitionTests.cs\r\n HTMLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\HTMLFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add image field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageFieldDefinitionTests\r\n CanDeploySimpleImageFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests.CanDeploySimpleImageFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests\r\n 0\r\n ImageFieldDefinitionTests.cs\r\n ImageFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add image rendition\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageRenditionDefinitionTests\r\n CanDeploySimpleImageRenditionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests.CanDeploySimpleImageRenditionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests\r\n 0\r\n ImageRenditionDefinitionTests.cs\r\n ImageRenditionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageRenditionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n \r\n \r\n \r\n Add item display template\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ItemDisplayTemplateDefinitionTests\r\n CanDeploySimpleItemDisplayTemplateDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests.CanDeploySimpleItemDisplayTemplateDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests\r\n 0\r\n ItemDisplayTemplateDefinitionTests.cs\r\n ItemDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ItemDisplayTemplateDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add JavaScript display template\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JavaScriptDisplayTemplateDefinitionTests\r\n CanDeploySimpleJavaScriptDisplayTemplateDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests.CanDeploySimpleJavaScriptDisplayTemplateDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests\r\n 0\r\n JavaScriptDisplayTemplateDefinitionTests.cs\r\n JavaScriptDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\JavaScriptDisplayTemplateDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add link field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n LinkFieldDefinitionTests\r\n CanDeploySimpleLinkFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests.CanDeploySimpleLinkFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests\r\n 0\r\n LinkFieldDefinitionTests.cs\r\n LinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\LinkFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add media field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MediaFieldDefinitionTests\r\n CanDeploySimpleMediaFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests.CanDeploySimpleMediaFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests\r\n 0\r\n MediaFieldDefinitionTests.cs\r\n MediaFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\MediaFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add page layout and site template settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests.CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n 0\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add publishing pages\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var aboutPublishing = new PublishingPageDefinition\r\n{\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar howToPublising = new PublishingPageDefinition\r\n{\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n};\r\n\r\nvar publishingLinks = new PublishingPageDefinition\r\n{\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPage\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPage\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add publishing pages with custom layout\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n// it should be a file name of the file inside \'master page\' gallery\r\n\r\nvar customPublishing = new PublishingPageDefinition\r\n{\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPageWithCustomeLayout\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPageWithCustomeLayout\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add publishing pages to folders\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var archive = new FolderDefinition()\r\n{\r\n Name = \"Archive\"\r\n};\r\n\r\nvar year2014 = new FolderDefinition()\r\n{\r\n Name = \"2014\"\r\n};\r\n\r\nvar year2015 = new FolderDefinition()\r\n{\r\n Name = \"2015\"\r\n};\r\n\r\nvar oct2014Article = new PublishingPageDefinition\r\n{\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar dec2014Article = new PublishingPageDefinition\r\n{\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar oct2015Article = new PublishingPageDefinition\r\n{\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar dec2015Article = new PublishingPageDefinition\r\n{\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPageToFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPageToFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add publishing page layout\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n var publishingPageContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n};\r\n\r\nvar publshingPageLayout = new PublishingPageLayoutDefinition\r\n{\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddContentType(publishingPageContentType);\r\n});\r\n\r\nvar rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(rootWebModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageLayoutDefinitionTests\r\n CanDeploySimplePublishingPageLayoutDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests.CanDeploySimplePublishingPageLayoutDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests\r\n 0\r\n PublishingPageLayoutDefinitionTests.cs\r\n PublishingPageLayoutDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageLayoutDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add Document ID provider\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CustomDocumentIdProviderDefinitionTests\r\n CanDeploySimpleCustomDocumentIdProviderDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests.CanDeploySimpleCustomDocumentIdProviderDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests\r\n 0\r\n CustomDocumentIdProviderDefinitionTests.cs\r\n CustomDocumentIdProviderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\CustomDocumentIdProviderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add HTML field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HTMLFieldDefinitionTests\r\n CanDeploySimpleHTMLFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests.CanDeploySimpleHTMLFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests\r\n 0\r\n HTMLFieldDefinitionTests.cs\r\n HTMLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\HTMLFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add image field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageFieldDefinitionTests\r\n CanDeploySimpleImageFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests.CanDeploySimpleImageFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests\r\n 0\r\n ImageFieldDefinitionTests.cs\r\n ImageFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add image rendition\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageRenditionDefinitionTests\r\n CanDeploySimpleImageRenditionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests.CanDeploySimpleImageRenditionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests\r\n 0\r\n ImageRenditionDefinitionTests.cs\r\n ImageRenditionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageRenditionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add item display template\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ItemDisplayTemplateDefinitionTests\r\n CanDeploySimpleItemDisplayTemplateDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests.CanDeploySimpleItemDisplayTemplateDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests\r\n 0\r\n ItemDisplayTemplateDefinitionTests.cs\r\n ItemDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ItemDisplayTemplateDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add JavaScript display template\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JavaScriptDisplayTemplateDefinitionTests\r\n CanDeploySimpleJavaScriptDisplayTemplateDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests.CanDeploySimpleJavaScriptDisplayTemplateDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests\r\n 0\r\n JavaScriptDisplayTemplateDefinitionTests.cs\r\n JavaScriptDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\JavaScriptDisplayTemplateDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add link field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n LinkFieldDefinitionTests\r\n CanDeploySimpleLinkFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests.CanDeploySimpleLinkFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests\r\n 0\r\n LinkFieldDefinitionTests.cs\r\n LinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\LinkFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add media field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MediaFieldDefinitionTests\r\n CanDeploySimpleMediaFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests.CanDeploySimpleMediaFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests\r\n 0\r\n MediaFieldDefinitionTests.cs\r\n MediaFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\MediaFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Setup default web templates\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var sitePublishingInfrastructureFeature = BuiltInSiteFeatures.SharePointServerPublishingInfrastructure.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var webPublishingInfrastructureFeature = BuiltInWebFeatures.SharePointServerPublishing.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var settings = new PageLayoutAndSiteTemplateSettingsDefinition\r\n {\r\n // setup web templates\r\n UseDefinedWebTemplates = true,\r\n DefinedWebTemplates = new Collection<string>\r\n {\r\n BuiltInWebTemplates.Collaboration.BlankSite,\r\n BuiltInWebTemplates.Collaboration.Blog,\r\n BuiltInWebTemplates.Collaboration.TeamSite\r\n },\r\n\r\n // setup page layouts\r\n UseDefinedPageLayouts = true,\r\n DefinedPageLayouts = new Collection<string>\r\n {\r\n BuiltInPublishingPageLayoutNames.ArticleLeft,\r\n BuiltInPublishingPageLayoutNames.ArticleRight,\r\n BuiltInPublishingPageLayoutNames.ArticleLinks\r\n },\r\n\r\n // setup default page layout\r\n UseDefinedDefaultPageLayout = true,\r\n DefinedDefaultPageLayout = BuiltInPublishingPageLayoutNames.ArticleRight,\r\n };\r\n\r\n // create site model to enable publishing infrastructure\r\n // then deploy web model with page layout settings\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSiteFeature(sitePublishingInfrastructureFeature);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWebFeature(webPublishingInfrastructureFeature);\r\n web.AddPageLayoutAndSiteTemplateSettings(settings);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var sitePublishingInfrastructureFeature = BuiltInSiteFeatures.SharePointServerPublishingInfrastructure.Inherit(def =>\r\n{\r\n def.Enable();\r\n});\r\n\r\nvar webPublishingInfrastructureFeature = BuiltInWebFeatures.SharePointServerPublishing.Inherit(def =>\r\n{\r\n def.Enable();\r\n});\r\n\r\nvar settings = new PageLayoutAndSiteTemplateSettingsDefinition\r\n{\r\n // setup web templates\r\n UseDefinedWebTemplates = true,\r\n DefinedWebTemplates = new Collection<string>\r\n {\r\n BuiltInWebTemplates.Collaboration.BlankSite,\r\n BuiltInWebTemplates.Collaboration.Blog,\r\n BuiltInWebTemplates.Collaboration.TeamSite\r\n },\r\n\r\n // setup page layouts\r\n UseDefinedPageLayouts = true,\r\n DefinedPageLayouts = new Collection<string>\r\n {\r\n BuiltInPublishingPageLayoutNames.ArticleLeft,\r\n BuiltInPublishingPageLayoutNames.ArticleRight,\r\n BuiltInPublishingPageLayoutNames.ArticleLinks\r\n },\r\n\r\n // setup default page layout\r\n UseDefinedDefaultPageLayout = true,\r\n DefinedDefaultPageLayout = BuiltInPublishingPageLayoutNames.ArticleRight,\r\n};\r\n\r\n// create site model to enable publishing infrastructure\r\n// then deploy web model with page layout settings\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSiteFeature(sitePublishingInfrastructureFeature);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWebFeature(webPublishingInfrastructureFeature);\r\n web.AddPageLayoutAndSiteTemplateSettings(settings);\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests.CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n 0\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add publishing pages\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var aboutPublishing = new PublishingPageDefinition\r\n{\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar howToPublising = new PublishingPageDefinition\r\n{\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n};\r\n\r\nvar publishingLinks = new PublishingPageDefinition\r\n{\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPage\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPage\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add publishing pages with custom layout\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n// it should be a file name of the file inside \'master page\' gallery\r\n\r\nvar customPublishing = new PublishingPageDefinition\r\n{\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPageWithCustomeLayout\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPageWithCustomeLayout\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add publishing pages to folders\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var archive = new FolderDefinition()\r\n{\r\n Name = \"Archive\"\r\n};\r\n\r\nvar year2014 = new FolderDefinition()\r\n{\r\n Name = \"2014\"\r\n};\r\n\r\nvar year2015 = new FolderDefinition()\r\n{\r\n Name = \"2015\"\r\n};\r\n\r\nvar oct2014Article = new PublishingPageDefinition\r\n{\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar dec2014Article = new PublishingPageDefinition\r\n{\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar oct2015Article = new PublishingPageDefinition\r\n{\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar dec2015Article = new PublishingPageDefinition\r\n{\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPageToFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPageToFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n \r\n \r\n \r\n Add publishing page layout\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n var publishingPageContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n};\r\n\r\nvar publshingPageLayout = new PublishingPageLayoutDefinition\r\n{\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddContentType(publishingPageContentType);\r\n});\r\n\r\nvar rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(rootWebModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageLayoutDefinitionTests\r\n CanDeploySimplePublishingPageLayoutDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests.CanDeploySimplePublishingPageLayoutDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests\r\n 0\r\n PublishingPageLayoutDefinitionTests.cs\r\n PublishingPageLayoutDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageLayoutDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add search configuration\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSearchConfigurationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchConfigurationDefinitionTests\r\n CanDeploySimpleSearchConfigurationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchConfigurationDefinitionTests.CanDeploySimpleSearchConfigurationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchConfigurationDefinitionTests\r\n 0\r\n SearchConfigurationDefinitionTests.cs\r\n SearchConfigurationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchConfigurationDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add search result\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchResultDefinitionTests\r\n CanDeploySimpleSearchResultDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests.CanDeploySimpleSearchResultDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests\r\n 0\r\n SearchResultDefinitionTests.cs\r\n SearchResultDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchResultDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add search settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchSettingsDefinitionTests\r\n CanDeploySimpleSearchSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests.CanDeploySimpleSearchSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests\r\n 0\r\n SearchSettingsDefinitionTests.cs\r\n SearchSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add Site Feed web part\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n{\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteFeedWebPartDefinitionTests\r\n CanDeploySimpleSiteFeedWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests.CanDeploySimpleSiteFeedWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests\r\n 0\r\n SiteFeedWebPartDefinitionTests.cs\r\n SiteFeedWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SiteFeedWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add summary link field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkFieldDefinitionTests\r\n CanDeploySimpleSummaryLinkFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests.CanDeploySimpleSummaryLinkFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests\r\n 0\r\n SummaryLinkFieldDefinitionTests.cs\r\n SummaryLinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add Summary Links web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkWebPartDefinitionTests\r\n CanDeploySimpleSummaryLinkWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests.CanDeploySimpleSummaryLinkWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests\r\n 0\r\n SummaryLinkWebPartDefinitionTests.cs\r\n SummaryLinkWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add taxonomy field\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // define a taxonomy\r\n// term store -> group -> term set -> terms\r\nvar taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar taxTermGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"M2 Taxonomy\"\r\n};\r\n\r\nvar taxTermSet = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Locations\"\r\n};\r\n\r\nvar taxTermLondon = new TaxonomyTermDefinition\r\n{\r\n Name = \"London\"\r\n};\r\n\r\nvar taxTermSydney = new TaxonomyTermDefinition\r\n{\r\n Name = \"Sydney\"\r\n};\r\n\r\n// define the field\r\nvar location = new TaxonomyFieldDefinition\r\n{\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyFieldDefinitionTests\r\n CanDeployTaxonomyField\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests.CanDeployTaxonomyField\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests\r\n 0\r\n TaxonomyFieldDefinitionTests.cs\r\n TaxonomyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add taxonomy terms\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model \r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // define term store\r\nvar defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\n// define group\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\n// define term sets\r\nvar smallBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Small Business\"\r\n};\r\n\r\nvar mediumBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Medium Business\"\r\n};\r\n\r\nvar enterpriseBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Enterprise Business\"\r\n};\r\n\r\n// define terms\r\nvar microsoft = new TaxonomyTermDefinition\r\n{\r\n Name = \"Microsoft\"\r\n};\r\n\r\nvar apple = new TaxonomyTermDefinition\r\n{\r\n Name = \"Apple\"\r\n};\r\n\r\nvar oracle = new TaxonomyTermDefinition\r\n{\r\n Name = \"Oracle\"\r\n};\r\n\r\nvar subPointSolutions = new TaxonomyTermDefinition\r\n{\r\n Name = \"SubPoint Solutions\"\r\n};\r\n\r\n// setup the model\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermDefinitionTests\r\n CanDeploySimpleTaxonomyTerms\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests.CanDeploySimpleTaxonomyTerms\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests\r\n 0\r\n TaxonomyTermDefinitionTests.cs\r\n TaxonomyTermDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add taxonomy term group\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n CanDeploySimpleTaxonomyGroup\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests.CanDeploySimpleTaxonomyGroup\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add taxonomy term groups\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar parthersGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Parthers\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n CanDeploySimpleTaxonomyGroups\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests.CanDeploySimpleTaxonomyGroups\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add taxonomy term label\r\n \r\n \r\n \r\n \r\n \r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermLabelDefinitionTests\r\n CanDeploySimpleTaxonomyTermLabelDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests.CanDeploySimpleTaxonomyTermLabelDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests\r\n 0\r\n TaxonomyTermLabelDefinitionTests.cs\r\n TaxonomyTermLabelDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermLabelDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Add taxonomy termsets\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar smallBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Small Business\"\r\n};\r\n\r\nvar mediumBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Medium Business\"\r\n};\r\n\r\nvar enterpriseBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Enterprise Business\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermSetDefinitionTests\r\n CanDeploySimpleTaxonomyTermSets\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests.CanDeploySimpleTaxonomyTermSets\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests\r\n 0\r\n TaxonomyTermSetDefinitionTests.cs\r\n TaxonomyTermSetDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermSetDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add taxonomy term store by Name\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n Name = \"Managed Metadata Service\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n LookupTermStoreByName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests.LookupTermStoreByName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add default taxonomy term store\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n LookupDefaultSiteTermStore\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests.LookupDefaultSiteTermStore\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add search result\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchResultDefinitionTests\r\n CanDeploySimpleSearchResultDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests.CanDeploySimpleSearchResultDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests\r\n 0\r\n SearchResultDefinitionTests.cs\r\n SearchResultDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchResultDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add search settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchSettingsDefinitionTests\r\n CanDeploySimpleSearchSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests.CanDeploySimpleSearchSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests\r\n 0\r\n SearchSettingsDefinitionTests.cs\r\n SearchSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add Site Feed web part\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n{\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteFeedWebPartDefinitionTests\r\n CanDeploySimpleSiteFeedWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests.CanDeploySimpleSiteFeedWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests\r\n 0\r\n SiteFeedWebPartDefinitionTests.cs\r\n SiteFeedWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SiteFeedWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add summary link field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkFieldDefinitionTests\r\n CanDeploySimpleSummaryLinkFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests.CanDeploySimpleSummaryLinkFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests\r\n 0\r\n SummaryLinkFieldDefinitionTests.cs\r\n SummaryLinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add Summary Links web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkWebPartDefinitionTests\r\n CanDeploySimpleSummaryLinkWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests.CanDeploySimpleSummaryLinkWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests\r\n 0\r\n SummaryLinkWebPartDefinitionTests.cs\r\n SummaryLinkWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add taxonomy field\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // define a taxonomy\r\n// term store -> group -> term set -> terms\r\nvar taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar taxTermGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"M2 Taxonomy\"\r\n};\r\n\r\nvar taxTermSet = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Locations\"\r\n};\r\n\r\nvar taxTermLondon = new TaxonomyTermDefinition\r\n{\r\n Name = \"London\"\r\n};\r\n\r\nvar taxTermSydney = new TaxonomyTermDefinition\r\n{\r\n Name = \"Sydney\"\r\n};\r\n\r\n// define the field\r\nvar location = new TaxonomyFieldDefinition\r\n{\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyFieldDefinitionTests\r\n CanDeployTaxonomyField\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests.CanDeployTaxonomyField\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests\r\n 0\r\n TaxonomyFieldDefinitionTests.cs\r\n TaxonomyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add taxonomy terms\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model \r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // define term store\r\nvar defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\n// define group\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\n// define term sets\r\nvar smallBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Small Business\"\r\n};\r\n\r\nvar mediumBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Medium Business\"\r\n};\r\n\r\nvar enterpriseBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Enterprise Business\"\r\n};\r\n\r\n// define terms\r\nvar microsoft = new TaxonomyTermDefinition\r\n{\r\n Name = \"Microsoft\"\r\n};\r\n\r\nvar apple = new TaxonomyTermDefinition\r\n{\r\n Name = \"Apple\"\r\n};\r\n\r\nvar oracle = new TaxonomyTermDefinition\r\n{\r\n Name = \"Oracle\"\r\n};\r\n\r\nvar subPointSolutions = new TaxonomyTermDefinition\r\n{\r\n Name = \"SubPoint Solutions\"\r\n};\r\n\r\n// setup the model\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermDefinitionTests\r\n CanDeploySimpleTaxonomyTerms\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests.CanDeploySimpleTaxonomyTerms\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests\r\n 0\r\n TaxonomyTermDefinitionTests.cs\r\n TaxonomyTermDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add taxonomy term group\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n CanDeploySimpleTaxonomyGroup\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests.CanDeploySimpleTaxonomyGroup\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add taxonomy term groups\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar parthersGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Parthers\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n CanDeploySimpleTaxonomyGroups\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests.CanDeploySimpleTaxonomyGroups\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Add taxonomy term label\r\n \r\n \r\n \r\n \r\n \r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermLabelDefinitionTests\r\n CanDeploySimpleTaxonomyTermLabelDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests.CanDeploySimpleTaxonomyTermLabelDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests\r\n 0\r\n TaxonomyTermLabelDefinitionTests.cs\r\n TaxonomyTermLabelDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermLabelDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add taxonomy termsets\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar smallBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Small Business\"\r\n};\r\n\r\nvar mediumBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Medium Business\"\r\n};\r\n\r\nvar enterpriseBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Enterprise Business\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermSetDefinitionTests\r\n CanDeploySimpleTaxonomyTermSets\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests.CanDeploySimpleTaxonomyTermSets\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests\r\n 0\r\n TaxonomyTermSetDefinitionTests.cs\r\n TaxonomyTermSetDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermSetDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Add taxonomy term store by Name\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n Name = \"Managed Metadata Service\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n LookupTermStoreByName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests.LookupTermStoreByName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Add default taxonomy term store\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n LookupDefaultSiteTermStore\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests.LookupDefaultSiteTermStore\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add web navigation settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleWebNavigationSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebNavigationSettingsDefinitionTests\r\n CanDeploySimpleWebNavigationSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebNavigationSettingsDefinitionTests.CanDeploySimpleWebNavigationSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebNavigationSettingsDefinitionTests\r\n 0\r\n WebNavigationSettingsDefinitionTests.cs\r\n WebNavigationSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\WebNavigationSettingsDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n RegressionTestingBase\r\n \r\n public class RegressionTestingBase : ProvisionTestBase\r\n {\r\n protected void TestRandomDefinition<WebDefinition>() { }\r\n }\r\n public class RegressionTestingBase : ProvisionTestBase\r\n{\r\n protected void TestRandomDefinition<WebDefinition>() { }\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.SPMeta2.extensibility\r\n RegressionTestingBase\r\n RegressionTestingBaseClass\r\n \r\n ClassRegressionTestingBaseClass\r\n SubPointSolutions.Docs.Views.SPMeta2.extensibility.RegressionTestingBase\r\n 0\r\n regression-testing.cs\r\n regression-testing\r\n ..\\..\\Views\\SPMeta2\\extensibility\r\n ..\\..\\Views\\SPMeta2\\extensibility\\regression-testing.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n Regressiontesting\r\n \r\n public class Regressiontesting : RegressionTestingBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Regression.Rnd.Web\")]\r\n public void CanDeployRandom_WebDefinition()\r\n {\r\n TestRandomDefinition<WebDefinition>();\r\n }\r\n\r\n #endregion\r\n }\r\n public class Regressiontesting : RegressionTestingBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Regression.Rnd.Web\")]\r\n public void CanDeployRandom_WebDefinition()\r\n {\r\n TestRandomDefinition<WebDefinition>();\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.SPMeta2.extensibility\r\n Regressiontesting\r\n RegressiontestingClass\r\n \r\n ClassRegressiontestingClass\r\n SubPointSolutions.Docs.Views.SPMeta2.extensibility.Regressiontesting\r\n 0\r\n regression-testing.cs\r\n regression-testing\r\n ..\\..\\Views\\SPMeta2\\extensibility\r\n ..\\..\\Views\\SPMeta2\\extensibility\\regression-testing.cs\r\n") , @@ -227,117 +236,118 @@ public static class m2Samples SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n Basics\r\n \r\n \r\n public class Basics : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Basics\")]\r\n public void ABigPictureSample(ClientContext clientContext)\r\n {\r\n // Step 1, create \'definitions\' - a bunch of CSharp POCO objects \r\n var clientDescriptionField = new FieldDefinition\r\n {\r\n Title = \"Client Description\",\r\n InternalName = \"dcs_ClientDescription\",\r\n Group = DocConsts.DefaulFieldsGroup,\r\n Id = new Guid(\"06975b67-01f5-47d7-9e2e-2702dfb8c217\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerAccountContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Account\",\r\n Id = new Guid(\"ddc46a66-19a0-460b-a723-c84d7f60a342\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = DocConsts.DefaultContentTypeGroup\r\n };\r\n\r\n // step 2, define relationships between definitions\r\n // we need to build a logical \'model tree\'\r\n\r\n // fields and content types live under site\r\n // so use SiteModel and add fields/content types under site\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddField(clientDescriptionField);\r\n site.AddContentType(customerAccountContentType);\r\n });\r\n\r\n // step 3, deploy site model via CSOM\r\n var csomProvisionService = new CSOMProvisionService();\r\n csomProvisionService.DeploySiteModel(clientContext, siteModel);\r\n }\r\n\r\n #endregion\r\n }\r\n public class Basics : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Basics\")]\r\n public void ABigPictureSample(ClientContext clientContext)\r\n {\r\n // Step 1, create \'definitions\' - a bunch of CSharp POCO objects\r\n var clientDescriptionField = new FieldDefinition\r\n {\r\n Title = \"Client Description\",\r\n InternalName = \"dcs_ClientDescription\",\r\n Group = DocConsts.DefaulFieldsGroup,\r\n Id = new Guid(\"06975b67-01f5-47d7-9e2e-2702dfb8c217\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerAccountContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Account\",\r\n Id = new Guid(\"ddc46a66-19a0-460b-a723-c84d7f60a342\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = DocConsts.DefaultContentTypeGroup\r\n };\r\n\r\n // step 2, define relationships between definitions\r\n // we need to build a logical \'model tree\'\r\n\r\n // fields and content types live under site\r\n // so use SiteModel and add fields/content types under site\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddField(clientDescriptionField);\r\n site.AddContentType(customerAccountContentType);\r\n });\r\n\r\n // step 3, deploy site model via CSOM\r\n var csomProvisionService = new CSOMProvisionService();\r\n csomProvisionService.DeploySiteModel(clientContext, siteModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n Basics\r\n BasicsClass\r\n \r\n ClassBasicsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.Basics\r\n 0\r\n Basics.cs\r\n Basics\r\n ..\\..\\Views\\SPMeta2\\getting-started\r\n ..\\..\\Views\\SPMeta2\\getting-started\\Basics.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n ConsoleApSamples\r\n \r\n \r\n public class ConsoleApSamples : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Basics\")]\r\n public void CSOMConsoleAppSample(string[] args)\r\n {\r\n var siteUrl = \"http://tesla-dev:31415/\";\r\n\r\n\r\n // define fields\r\n var clientDescriptionField = new FieldDefinition\r\n {\r\n Title = \"Client Description\",\r\n InternalName = \"dcs_ClientDescription\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"06975b67-01f5-47d7-9e2e-2702dfb8c217\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var clientNumberField = new FieldDefinition\r\n {\r\n Title = \"Client Number\",\r\n InternalName = \"dcs_ClientNumber\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"22264486-7561-45ec-a6bc-591ba243693b\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n\r\n // define content type\r\n var customerAccountContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Account\",\r\n Id = new Guid(\"ddc46a66-19a0-460b-a723-c84d7f60a342\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\",\r\n };\r\n\r\n // define relationships and the model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(clientDescriptionField)\r\n .AddField(clientNumberField)\r\n .AddContentType(customerAccountContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(clientDescriptionField)\r\n .AddContentTypeFieldLink(clientNumberField);\r\n });\r\n });\r\n\r\n var clientContext = new ClientContext(siteUrl);\r\n\r\n // deploy the model to the SharePoint site over CSOM\r\n var csomProvisionService = new CSOMProvisionService();\r\n csomProvisionService.DeploySiteModel(clientContext, siteModel);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Basics\")]\r\n static void SSOMConsoleAppSample(string[] args)\r\n {\r\n var siteUrl = \"http://tesla-dev:31415/\";\r\n\r\n // define fields\r\n var clientDescriptionField = new FieldDefinition\r\n {\r\n Title = \"Client Description\",\r\n InternalName = \"dcs_ClientDescription\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"06975b67-01f5-47d7-9e2e-2702dfb8c217\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var clientNumberField = new FieldDefinition\r\n {\r\n Title = \"Client Number\",\r\n InternalName = \"dcs_ClientNumber\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"22264486-7561-45ec-a6bc-591ba243693b\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n\r\n // define content type\r\n var customerAccountContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Account\",\r\n Id = new Guid(\"ddc46a66-19a0-460b-a723-c84d7f60a342\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\",\r\n };\r\n\r\n // define relationships and the model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(clientDescriptionField)\r\n .AddField(clientNumberField)\r\n .AddContentType(customerAccountContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(clientDescriptionField)\r\n .AddContentTypeFieldLink(clientNumberField);\r\n });\r\n });\r\n\r\n using (var spSite = new SPSite(siteUrl))\r\n {\r\n // deploy the model to the SharePoint site over CSOM\r\n var ssomProvisionService = new SSOMProvisionService();\r\n ssomProvisionService.DeploySiteModel(spSite, siteModel);\r\n }\r\n }\r\n\r\n #endregion\r\n }\r\n public class ConsoleApSamples : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Basics\")]\r\n public void CSOMConsoleAppSample(string[] args)\r\n {\r\n var siteUrl = \"http://tesla-dev:31415/\";\r\n\r\n\r\n // define fields\r\n var clientDescriptionField = new FieldDefinition\r\n {\r\n Title = \"Client Description\",\r\n InternalName = \"dcs_ClientDescription\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"06975b67-01f5-47d7-9e2e-2702dfb8c217\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var clientNumberField = new FieldDefinition\r\n {\r\n Title = \"Client Number\",\r\n InternalName = \"dcs_ClientNumber\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"22264486-7561-45ec-a6bc-591ba243693b\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n\r\n // define content type\r\n var customerAccountContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Account\",\r\n Id = new Guid(\"ddc46a66-19a0-460b-a723-c84d7f60a342\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\",\r\n };\r\n\r\n // define relationships and the model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(clientDescriptionField)\r\n .AddField(clientNumberField)\r\n .AddContentType(customerAccountContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(clientDescriptionField)\r\n .AddContentTypeFieldLink(clientNumberField);\r\n });\r\n });\r\n\r\n var clientContext = new ClientContext(siteUrl);\r\n\r\n // deploy the model to the SharePoint site over CSOM\r\n var csomProvisionService = new CSOMProvisionService();\r\n csomProvisionService.DeploySiteModel(clientContext, siteModel);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Basics\")]\r\n static void SSOMConsoleAppSample(string[] args)\r\n {\r\n var siteUrl = \"http://tesla-dev:31415/\";\r\n\r\n // define fields\r\n var clientDescriptionField = new FieldDefinition\r\n {\r\n Title = \"Client Description\",\r\n InternalName = \"dcs_ClientDescription\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"06975b67-01f5-47d7-9e2e-2702dfb8c217\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var clientNumberField = new FieldDefinition\r\n {\r\n Title = \"Client Number\",\r\n InternalName = \"dcs_ClientNumber\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"22264486-7561-45ec-a6bc-591ba243693b\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n\r\n // define content type\r\n var customerAccountContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Account\",\r\n Id = new Guid(\"ddc46a66-19a0-460b-a723-c84d7f60a342\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\",\r\n };\r\n\r\n // define relationships and the model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(clientDescriptionField)\r\n .AddField(clientNumberField)\r\n .AddContentType(customerAccountContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(clientDescriptionField)\r\n .AddContentTypeFieldLink(clientNumberField);\r\n });\r\n });\r\n\r\n using (var spSite = new SPSite(siteUrl))\r\n {\r\n // deploy the model to the SharePoint site over CSOM\r\n var ssomProvisionService = new SSOMProvisionService();\r\n ssomProvisionService.DeploySiteModel(spSite, siteModel);\r\n }\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ConsoleApSamples\r\n ConsoleApSamplesClass\r\n \r\n ClassConsoleApSamplesClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ConsoleApSamples\r\n 0\r\n ConsoleAppSamples.cs\r\n ConsoleAppSamples\r\n ..\\..\\Views\\SPMeta2\\getting-started\r\n ..\\..\\Views\\SPMeta2\\getting-started\\ConsoleAppSamples.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n Models\r\n \r\n \r\n public class Models : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Models\")]\r\n public void SettingUpSiteModels()\r\n {\r\n // step 1, setup your definition\r\n\r\n // step 2, setup your site models\r\n var taxonomyModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup site taxonomy\r\n });\r\n\r\n var featuresAndSandboxSolutionsModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup sandbox solutions and features\r\n });\r\n\r\n var fieldsAndContentTypesModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup fields and content types\r\n });\r\n\r\n // step 3, deploy site models\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Models\")]\r\n public void SettingUpWebModels()\r\n {\r\n // step 1, setup your definition\r\n\r\n // step 2, setup your site models\r\n var featuresModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup features\r\n });\r\n\r\n var listsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup fields and content types\r\n });\r\n\r\n var navigationModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup web navigation\r\n });\r\n\r\n // step 3, deploy web models\r\n }\r\n\r\n #endregion\r\n }\r\n public class Models : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Models\")]\r\n public void SettingUpSiteModels()\r\n {\r\n // step 1, setup your definition\r\n\r\n // step 2, setup your site models\r\n var taxonomyModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup site taxonomy\r\n });\r\n\r\n var featuresAndSandboxSolutionsModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup sandbox solutions and features\r\n });\r\n\r\n var fieldsAndContentTypesModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup fields and content types\r\n });\r\n\r\n // step 3, deploy site models\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Models\")]\r\n public void SettingUpWebModels()\r\n {\r\n // step 1, setup your definition\r\n\r\n // step 2, setup your site models\r\n var featuresModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup features\r\n });\r\n\r\n var listsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup fields and content types\r\n });\r\n\r\n var navigationModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup web navigation\r\n });\r\n\r\n // step 3, deploy web models\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n Models\r\n ModelsClass\r\n \r\n ClassModelsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.Models\r\n 0\r\n Models.cs\r\n Models\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\Models.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n ProvisionServices\r\n \r\n \r\n public class ProvisionServices : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_SiteModel_CSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(clientContext, siteModel);\r\n\r\n // deploy site model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(clientContext, siteModel);\r\n }\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebModel_CSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(webUrl))\r\n {\r\n // deploy web model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(clientContext, webModel);\r\n\r\n // deploy web model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeployWebModel(clientContext, webModel);\r\n }\r\n }\r\n\r\n #region ssom\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_FarmModel_SSOM()\r\n {\r\n // create you model\r\n var farmModel = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n\r\n });\r\n\r\n var spFarm = SPFarm.Local;\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployFarmModel(spFarm, farmModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployFarmModel(spFarm, farmModel);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebApplicationModel_SSOM()\r\n {\r\n // setup url\r\n var webAppUrl = \"\";\r\n\r\n // create you model\r\n var webAppModel = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n\r\n });\r\n\r\n var spWebApp = SPWebApplication.Lookup(new Uri(webAppUrl));\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_SiteModel_SSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(spSite, siteModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(spSite, siteModel);\r\n }\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebModel_SSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(spWeb, webModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebModel(spWeb, webModel);\r\n }\r\n }\r\n }\r\n\r\n #endregion\r\n\r\n #region incremental\r\n\r\n public void DeployIncrementally_Default_SSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardSSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(spWeb, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(spWeb, webModel);\r\n }\r\n }\r\n }\r\n public void DeployIncrementally_Default_CSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardCSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(clientContext, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(clientContext, webModel);\r\n }\r\n }\r\n\r\n\r\n #endregion\r\n\r\n #endregion\r\n }\r\n public class ProvisionServices : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_SiteModel_CSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(clientContext, siteModel);\r\n\r\n // deploy site model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(clientContext, siteModel);\r\n }\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebModel_CSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(webUrl))\r\n {\r\n // deploy web model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(clientContext, webModel);\r\n\r\n // deploy web model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeployWebModel(clientContext, webModel);\r\n }\r\n }\r\n\r\n #region ssom\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_FarmModel_SSOM()\r\n {\r\n // create you model\r\n var farmModel = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n\r\n });\r\n\r\n var spFarm = SPFarm.Local;\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployFarmModel(spFarm, farmModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployFarmModel(spFarm, farmModel);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebApplicationModel_SSOM()\r\n {\r\n // setup url\r\n var webAppUrl = \"\";\r\n\r\n // create you model\r\n var webAppModel = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n\r\n });\r\n\r\n var spWebApp = SPWebApplication.Lookup(new Uri(webAppUrl));\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_SiteModel_SSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(spSite, siteModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(spSite, siteModel);\r\n }\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebModel_SSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(spWeb, webModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebModel(spWeb, webModel);\r\n }\r\n }\r\n }\r\n\r\n #endregion\r\n\r\n #region incremental\r\n\r\n public void DeployIncrementally_Default_SSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardSSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(spWeb, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(spWeb, webModel);\r\n }\r\n }\r\n }\r\n public void DeployIncrementally_Default_CSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardCSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(clientContext, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(clientContext, webModel);\r\n }\r\n }\r\n\r\n\r\n #endregion\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n ProvisionServicesClass\r\n \r\n ClassProvisionServicesClass\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n SiteModel\r\n \r\n \r\n public class SiteModel : ProvisionTestBase\r\n {\r\n #region site model\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Models\")]\r\n public void SiteModelProvision()\r\n {\r\n // tend to separate models into small logical pieces\r\n // later you would deploy either all of them or only required bits\r\n\r\n var taxonomyModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup taxonomy\r\n });\r\n\r\n var sandboxSolutionsModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup sandbox solutions\r\n });\r\n\r\n var siteFeaturesModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup features\r\n });\r\n\r\n var siteIAModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup IA\r\n });\r\n\r\n var userCustomActionsModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup user custom actions model\r\n });\r\n\r\n\r\n // deploy needed models - all of them or only required bits\r\n }\r\n\r\n #endregion\r\n }\r\n public class SiteModel : ProvisionTestBase\r\n{\r\n #region site model\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Models\")]\r\n public void SiteModelProvision()\r\n {\r\n // tend to separate models into small logical pieces\r\n // later you would deploy either all of them or only required bits\r\n\r\n var taxonomyModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup taxonomy\r\n });\r\n\r\n var sandboxSolutionsModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup sandbox solutions\r\n });\r\n\r\n var siteFeaturesModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup features\r\n });\r\n\r\n var siteIAModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup IA\r\n });\r\n\r\n var userCustomActionsModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup user custom actions model\r\n });\r\n\r\n\r\n // deploy needed models - all of them or only required bits\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteModel\r\n SiteModelClass\r\n \r\n ClassSiteModelClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteModel\r\n 0\r\n SiteModel.cs\r\n SiteModel\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\SiteModel.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n Utils\r\n \r\n \r\n public class Utils : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Utils\")]\r\n public void UrlConcatenation()\r\n {\r\n // fast on two params\r\n var smQueryUrl = UrlUtility.CombineUrl(\"http://goole.com\", \"?q=spmeta2\");\r\n\r\n // a bigger one\r\n var bgQueryUrl = UrlUtility.CombineUrl(new string[]{ \r\n \"http://goole.com\",\r\n \"?\",\r\n \"q=1\",\r\n \"&p1=3\",\r\n \"&p2=tmp\"\r\n });\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Utils\")]\r\n public void ClientWebPartSetup(ClientWebPartDefinition wpModel, string webId)\r\n {\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(BuiltInWebPartTemplates.ClientWebPart)\r\n .SetOrUpdateProperty(\"FeatureId\", wpModel.FeatureId.ToString())\r\n .SetOrUpdateProperty(\"ProductId\", wpModel.ProductId.ToString())\r\n .SetOrUpdateProperty(\"WebPartName\", wpModel.WebPartName)\r\n .SetOrUpdateProperty(\"ProductWebId\", webId)\r\n .ToString();\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Utils\")]\r\n public void ContentEditorWebPartSetup(ContentEditorWebPartDefinition typedModel,\r\n string content, string contentLink)\r\n {\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(BuiltInWebPartTemplates.ContentEditorWebPart)\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", content, true)\r\n .SetOrUpdateContentEditorWebPartProperty(\"ContentLink\", contentLink)\r\n .ToString();\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Utils\")]\r\n public void XsltListViewWebPartSetup(XsltListViewWebPartDefinition typedModel,\r\n string listName, string listId, string titleUrl, string jsLink)\r\n {\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(BuiltInWebPartTemplates.XsltListViewWebPart)\r\n .SetListName(listName)\r\n .SetListId(listId)\r\n .SetTitleUrl(titleUrl)\r\n .SetOrUpdateProperty(\"JSLink\", jsLink)\r\n .ToString();\r\n }\r\n\r\n\r\n #endregion\r\n }\r\n public class Utils : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Utils\")]\r\n public void UrlConcatenation()\r\n {\r\n // fast on two params\r\n var smQueryUrl = UrlUtility.CombineUrl(\"http://goole.com\", \"?q=spmeta2\");\r\n\r\n // a bigger one\r\n var bgQueryUrl = UrlUtility.CombineUrl(new string[]{\r\n \"http://goole.com\",\r\n \"?\",\r\n \"q=1\",\r\n \"&p1=3\",\r\n \"&p2=tmp\"\r\n });\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Utils\")]\r\n public void ClientWebPartSetup(ClientWebPartDefinition wpModel, string webId)\r\n {\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(BuiltInWebPartTemplates.ClientWebPart)\r\n .SetOrUpdateProperty(\"FeatureId\", wpModel.FeatureId.ToString())\r\n .SetOrUpdateProperty(\"ProductId\", wpModel.ProductId.ToString())\r\n .SetOrUpdateProperty(\"WebPartName\", wpModel.WebPartName)\r\n .SetOrUpdateProperty(\"ProductWebId\", webId)\r\n .ToString();\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Utils\")]\r\n public void ContentEditorWebPartSetup(ContentEditorWebPartDefinition typedModel,\r\n string content, string contentLink)\r\n {\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(BuiltInWebPartTemplates.ContentEditorWebPart)\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", content, true)\r\n .SetOrUpdateContentEditorWebPartProperty(\"ContentLink\", contentLink)\r\n .ToString();\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Utils\")]\r\n public void XsltListViewWebPartSetup(XsltListViewWebPartDefinition typedModel,\r\n string listName, string listId, string titleUrl, string jsLink)\r\n {\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(BuiltInWebPartTemplates.XsltListViewWebPart)\r\n .SetListName(listName)\r\n .SetListId(listId)\r\n .SetTitleUrl(titleUrl)\r\n .SetOrUpdateProperty(\"JSLink\", jsLink)\r\n .ToString();\r\n }\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n Utils\r\n UtilsClass\r\n \r\n ClassUtilsClass\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.Utils\r\n 0\r\n Utils.cs\r\n Utils\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\Utils.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n WebModel\r\n \r\n \r\n public class WebModel : ProvisionTestBase\r\n {\r\n #region web model\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Models\")]\r\n public void WebModelProvision()\r\n {\r\n // tend to separate models into small logical pieces\r\n // later you would deploy either all of them or only required bits\r\n\r\n var featuresModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup features\r\n });\r\n\r\n var listsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup lists and list views\r\n });\r\n\r\n var pagesModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup pages\r\n });\r\n\r\n var webPartsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup web parts\r\n });\r\n\r\n var navigationModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup navigation \r\n });\r\n\r\n // deploy needed models - all of them or only required bits\r\n }\r\n\r\n #endregion\r\n }\r\n public class WebModel : ProvisionTestBase\r\n{\r\n #region web model\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Models\")]\r\n public void WebModelProvision()\r\n {\r\n // tend to separate models into small logical pieces\r\n // later you would deploy either all of them or only required bits\r\n\r\n var featuresModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup features\r\n });\r\n\r\n var listsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup lists and list views\r\n });\r\n\r\n var pagesModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup pages\r\n });\r\n\r\n var webPartsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup web parts\r\n });\r\n\r\n var navigationModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup navigation\r\n });\r\n\r\n // deploy needed models - all of them or only required bits\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n WebModel\r\n WebModelClass\r\n \r\n ClassWebModelClass\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.WebModel\r\n 0\r\n WebModel.cs\r\n WebModel\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\WebModel.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n Sample Category Order\r\n \r\n 200\r\n 200\r\n \r\n \r\n \r\n AlternateUrlDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n \r\n\r\n public class AlternateUrlDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AlternateUrlDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add alternate URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAlternateUrlDefinition()\r\n {\r\n var internalDef = new AlternateUrlDefinition\r\n {\r\n Url = \"http://the-portal\",\r\n UrlZone = BuiltInUrlZone.Intranet\r\n };\r\n\r\n var intranetDef = new AlternateUrlDefinition\r\n {\r\n Url = \"http://my-intranet.com.au\",\r\n UrlZone = BuiltInUrlZone.Internet\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddAlternateUrl(internalDef);\r\n webApp.AddAlternateUrl(intranetDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n\r\n\r\npublic class AlternateUrlDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AlternateUrlDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add alternate URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAlternateUrlDefinition()\r\n {\r\n var internalDef = new AlternateUrlDefinition\r\n {\r\n Url = \"http://the-portal\",\r\n UrlZone = BuiltInUrlZone.Intranet\r\n };\r\n\r\n var intranetDef = new AlternateUrlDefinition\r\n {\r\n Url = \"http://my-intranet.com.au\",\r\n UrlZone = BuiltInUrlZone.Internet\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddAlternateUrl(internalDef);\r\n webApp.AddAlternateUrl(intranetDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AlternateUrlDefinitionTests\r\n AlternateUrlDefinitionTestsClass\r\n \r\n ClassAlternateUrlDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AlternateUrlDefinitionTests\r\n 0\r\n AlternateUrlDefinitionTests.cs\r\n AlternateUrlDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AlternateUrlDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Site collection\r\n Web site\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n AppDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n \r\n\r\n public class AppDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version \r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n\r\n\r\npublic class AppDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version\r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppDefinitionTests\r\n AppDefinitionTestsClass\r\n \r\n ClassAppDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests\r\n 0\r\n AppDefinitionTests.cs\r\n AppDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n AppPrincipalDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class AppPrincipalDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppPrincipalDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app principal\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AppPrincipalDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppPrincipalDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app principal\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppPrincipalDefinitionTests\r\n AppPrincipalDefinitionTestsClass\r\n \r\n ClassAppPrincipalDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests\r\n 0\r\n AppPrincipalDefinitionTests.cs\r\n AppPrincipalDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppPrincipalDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n AuditSettingsDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class AuditSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AuditSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audit settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AuditSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AuditSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audit settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AuditSettingsDefinitionTests\r\n AuditSettingsDefinitionTestsClass\r\n \r\n ClassAuditSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests\r\n 0\r\n AuditSettingsDefinitionTests.cs\r\n AuditSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AuditSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n BooleanFieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class BooleanFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BooleanFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add boolean field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class BooleanFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BooleanFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add boolean field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BooleanFieldDefinitionTests\r\n BooleanFieldDefinitionTestsClass\r\n \r\n ClassBooleanFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests\r\n 0\r\n BooleanFieldDefinitionTests.cs\r\n BooleanFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BooleanFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n BreakRoleInheritanceDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class BreakRoleInheritanceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class BreakRoleInheritanceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n BreakRoleInheritanceDefinitionTestsClass\r\n \r\n ClassBreakRoleInheritanceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Web site\r\n Site collection\r\n Web site\r\n \r\n \r\n \r\n AppDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n \r\n\r\n public class AppDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version \r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n\r\n\r\npublic class AppDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version\r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppDefinitionTests\r\n AppDefinitionTestsClass\r\n \r\n ClassAppDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests\r\n 0\r\n AppDefinitionTests.cs\r\n AppDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n AppPrincipalDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class AppPrincipalDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppPrincipalDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app principal\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AppPrincipalDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppPrincipalDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app principal\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppPrincipalDefinitionTests\r\n AppPrincipalDefinitionTestsClass\r\n \r\n ClassAppPrincipalDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests\r\n 0\r\n AppPrincipalDefinitionTests.cs\r\n AppPrincipalDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppPrincipalDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n AuditSettingsDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class AuditSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AuditSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audit settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AuditSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AuditSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audit settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AuditSettingsDefinitionTests\r\n AuditSettingsDefinitionTestsClass\r\n \r\n ClassAuditSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests\r\n 0\r\n AuditSettingsDefinitionTests.cs\r\n AuditSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AuditSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n BooleanFieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class BooleanFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BooleanFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add boolean field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class BooleanFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BooleanFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add boolean field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BooleanFieldDefinitionTests\r\n BooleanFieldDefinitionTestsClass\r\n \r\n ClassBooleanFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests\r\n 0\r\n BooleanFieldDefinitionTests.cs\r\n BooleanFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BooleanFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n BreakRoleInheritanceDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class BreakRoleInheritanceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class BreakRoleInheritanceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n BreakRoleInheritanceDefinitionTestsClass\r\n \r\n ClassBreakRoleInheritanceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n BusinessDataFieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class BusinessDataFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BusinessDataFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add business data field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleBusinessDataFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class BusinessDataFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BusinessDataFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add business data field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleBusinessDataFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BusinessDataFieldDefinitionTests\r\n BusinessDataFieldDefinitionTestsClass\r\n \r\n ClassBusinessDataFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BusinessDataFieldDefinitionTests\r\n 0\r\n BusinessDataFieldDefinitionTests.cs\r\n BusinessDataFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BusinessDataFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n CalculatedFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CalculatedFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CalculatedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add calculated field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CalculatedFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CalculatedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add calculated field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CalculatedFieldDefinitionTests\r\n CalculatedFieldDefinitionTestsClass\r\n \r\n ClassCalculatedFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests\r\n 0\r\n CalculatedFieldDefinitionTests.cs\r\n CalculatedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CalculatedFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n ChoiceFieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ChoiceFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add choice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ChoiceFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add choice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ChoiceFieldDefinitionTests\r\n ChoiceFieldDefinitionTestsClass\r\n \r\n ClassChoiceFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests\r\n 0\r\n ChoiceFieldDefinitionTests.cs\r\n ChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ChoiceFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n CalculatedFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CalculatedFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CalculatedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add calculated field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CalculatedFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CalculatedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add calculated field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CalculatedFieldDefinitionTests\r\n CalculatedFieldDefinitionTestsClass\r\n \r\n ClassCalculatedFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests\r\n 0\r\n CalculatedFieldDefinitionTests.cs\r\n CalculatedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CalculatedFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n ChoiceFieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ChoiceFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add choice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ChoiceFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add choice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ChoiceFieldDefinitionTests\r\n ChoiceFieldDefinitionTestsClass\r\n \r\n ClassChoiceFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests\r\n 0\r\n ChoiceFieldDefinitionTests.cs\r\n ChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ChoiceFieldDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n ClientWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ClientWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ClientWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add client web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleClientWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ClientWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ClientWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add client web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleClientWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ClientWebPartDefinitionTests\r\n ClientWebPartDefinitionTestsClass\r\n \r\n ClassClientWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ClientWebPartDefinitionTests\r\n 0\r\n ClientWebPartDefinitionTests.cs\r\n ClientWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ClientWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n ComputedFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ComputedFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ComputedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add computed field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ComputedFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ComputedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add computed field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ComputedFieldDefinitionTests\r\n ComputedFieldDefinitionTestsClass\r\n \r\n ClassComputedFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests\r\n 0\r\n ComputedFieldDefinitionTests.cs\r\n ComputedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ComputedFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category Order\r\n \r\n 100\r\n 100\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n ContentDatabaseDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentDatabaseDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentDatabaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content database\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentDatabaseDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentDatabaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content database\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentDatabaseDefinitionTests\r\n ContentDatabaseDefinitionTestsClass\r\n \r\n ClassContentDatabaseDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests\r\n 0\r\n ContentDatabaseDefinitionTests.cs\r\n ContentDatabaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentDatabaseDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ContentEditorWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentEditorWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with link\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentEditorWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with link\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n ContentEditorWebPartDefinitionTestsClass\r\n \r\n ClassContentEditorWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n ContentTypeDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentTypeDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document set content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add several content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type with fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add parent-child content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentTypeDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document set content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add several content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type with fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add parent-child content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n ContentTypeDefinitionTestsClass\r\n \r\n ClassContentTypeDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n ComputedFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ComputedFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ComputedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add computed field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ComputedFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ComputedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add computed field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ComputedFieldDefinitionTests\r\n ComputedFieldDefinitionTestsClass\r\n \r\n ClassComputedFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests\r\n 0\r\n ComputedFieldDefinitionTests.cs\r\n ComputedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ComputedFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category Order\r\n \r\n 100\r\n 100\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n ContentDatabaseDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentDatabaseDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentDatabaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content database\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentDatabaseDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentDatabaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content database\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentDatabaseDefinitionTests\r\n ContentDatabaseDefinitionTestsClass\r\n \r\n ClassContentDatabaseDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests\r\n 0\r\n ContentDatabaseDefinitionTests.cs\r\n ContentDatabaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentDatabaseDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ContentEditorWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentEditorWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with link\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentEditorWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with link\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n ContentEditorWebPartDefinitionTestsClass\r\n \r\n ClassContentEditorWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n ContentTypeDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentTypeDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document set content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add several content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type with fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add parent-child content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentTypeDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document set content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add several content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type with fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add parent-child content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n ContentTypeDefinitionTestsClass\r\n \r\n ClassContentTypeDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n ContentTypeFieldLinkDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentTypeFieldLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeFieldLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to content types\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypeFieldLinkDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentTypeFieldLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeFieldLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to content types\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypeFieldLinkDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeFieldLinkDefinitionTests\r\n ContentTypeFieldLinkDefinitionTestsClass\r\n \r\n ClassContentTypeFieldLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeFieldLinkDefinitionTests\r\n 0\r\n ContentTypeFieldLinkDefinitionTests.cs\r\n ContentTypeFieldLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeFieldLinkDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ContentTypeLinkDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n public class ContentTypeLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to lists\",\r\n Description = \"\"\r\n )]\r\n \r\n public void CanDeploySimpleContentTypeLinkDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n public class ContentTypeLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to lists\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeploySimpleContentTypeLinkDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeLinkDefinitionTests\r\n ContentTypeLinkDefinitionTestsClass\r\n \r\n ClassContentTypeLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests\r\n 0\r\n ContentTypeLinkDefinitionTests.cs\r\n ContentTypeLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeLinkDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n CurrencyFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CurrencyFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CurrencyFieldDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add currency field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CurrencyFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CurrencyFieldDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add currency field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CurrencyFieldDefinitionTests\r\n CurrencyFieldDefinitionTestsClass\r\n \r\n ClassCurrencyFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests\r\n 0\r\n CurrencyFieldDefinitionTests.cs\r\n CurrencyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CurrencyFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n DateTimeFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class DateTimeFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DateTimeFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add datetime field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class DateTimeFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DateTimeFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add datetime field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DateTimeFieldDefinitionTests\r\n DateTimeFieldDefinitionTestsClass\r\n \r\n ClassDateTimeFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests\r\n 0\r\n DateTimeFieldDefinitionTests.cs\r\n DateTimeFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DateTimeFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n ContentTypeLinkDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentTypeLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListItemContentTypeLinkDefinition()\r\n {\r\n var customerInfoContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Information\",\r\n Id = new Guid(\"e33acc19-6d61-43b0-a313-4177065cd7c3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Information\",\r\n Description = \"A list to store customer information.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"CustomerInfo\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerInfoContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to document library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployDocumentItemContentTypeLinkDefinition()\r\n {\r\n var customerReportContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Report\",\r\n Id = new Guid(\"1836765c-6264-479b-a95b-a553a3d14ba3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Reports\",\r\n Description = \"A list to store customer reports.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerReports\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerReportContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentTypeLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListItemContentTypeLinkDefinition()\r\n {\r\n var customerInfoContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Information\",\r\n Id = new Guid(\"e33acc19-6d61-43b0-a313-4177065cd7c3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Information\",\r\n Description = \"A list to store customer information.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"CustomerInfo\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerInfoContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to document library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployDocumentItemContentTypeLinkDefinition()\r\n {\r\n var customerReportContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Report\",\r\n Id = new Guid(\"1836765c-6264-479b-a95b-a553a3d14ba3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Reports\",\r\n Description = \"A list to store customer reports.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerReports\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerReportContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeLinkDefinitionTests\r\n ContentTypeLinkDefinitionTestsClass\r\n \r\n ClassContentTypeLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests\r\n 0\r\n ContentTypeLinkDefinitionTests.cs\r\n ContentTypeLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeLinkDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n CurrencyFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CurrencyFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CurrencyFieldDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add currency field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CurrencyFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CurrencyFieldDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add currency field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CurrencyFieldDefinitionTests\r\n CurrencyFieldDefinitionTestsClass\r\n \r\n ClassCurrencyFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests\r\n 0\r\n CurrencyFieldDefinitionTests.cs\r\n CurrencyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CurrencyFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n DateTimeFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class DateTimeFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DateTimeFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add datetime field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class DateTimeFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DateTimeFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add datetime field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DateTimeFieldDefinitionTests\r\n DateTimeFieldDefinitionTestsClass\r\n \r\n ClassDateTimeFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests\r\n 0\r\n DateTimeFieldDefinitionTests.cs\r\n DateTimeFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DateTimeFieldDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n Web part pages\r\n \r\n \r\n \r\n DeleteWebPartsDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class DeleteWebPartsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DeleteWebPartsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Delete web part by Title\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployDeleteWebPartsDefinition_ByTitle()\r\n {\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts\",\r\n FileName = \"web-parts.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // aiming to delete two web part with the following titles:\r\n // \'My Tasks\'\r\n // \'My Projects\'\r\n var myWebPartDeletionDef = new DeleteWebPartsDefinition\r\n {\r\n WebParts = new List<WebPartMatch>(new WebPartMatch[] { \r\n new WebPartMatch {\r\n Title = \"My Tasks\"\r\n },\r\n new WebPartMatch {\r\n Title = \"My Projects\"\r\n }\r\n })\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddDeleteWebParts(myWebPartDeletionDef);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class DeleteWebPartsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DeleteWebPartsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Delete web part by Title\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployDeleteWebPartsDefinition_ByTitle()\r\n {\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts\",\r\n FileName = \"web-parts.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // aiming to delete two web part with the following titles:\r\n // \'My Tasks\'\r\n // \'My Projects\'\r\n var myWebPartDeletionDef = new DeleteWebPartsDefinition\r\n {\r\n WebParts = new List<WebPartMatch>(new WebPartMatch[] {\r\n new WebPartMatch {\r\n Title = \"My Tasks\"\r\n },\r\n new WebPartMatch {\r\n Title = \"My Projects\"\r\n }\r\n })\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddDeleteWebParts(myWebPartDeletionDef);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DeleteWebPartsDefinitionTests\r\n DeleteWebPartsDefinitionTestsClass\r\n \r\n ClassDeleteWebPartsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DeleteWebPartsDefinitionTests\r\n 0\r\n DeleteWebPartsDefinitionTests.cs\r\n DeleteWebPartsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DeleteWebPartsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n DiagnosticsServiceBaseDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class DiagnosticsServiceBaseDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DiagnosticsServiceBaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add diagnostic service\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class DiagnosticsServiceBaseDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DiagnosticsServiceBaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add diagnostic service\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DiagnosticsServiceBaseDefinitionTests\r\n DiagnosticsServiceBaseDefinitionTestsClass\r\n \r\n ClassDiagnosticsServiceBaseDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests\r\n 0\r\n DiagnosticsServiceBaseDefinitionTests.cs\r\n DiagnosticsServiceBaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DiagnosticsServiceBaseDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n DiagnosticsServiceBaseDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class DiagnosticsServiceBaseDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DiagnosticsServiceBaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add diagnostic service\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class DiagnosticsServiceBaseDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DiagnosticsServiceBaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add diagnostic service\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DiagnosticsServiceBaseDefinitionTests\r\n DiagnosticsServiceBaseDefinitionTestsClass\r\n \r\n ClassDiagnosticsServiceBaseDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests\r\n 0\r\n DiagnosticsServiceBaseDefinitionTests.cs\r\n DiagnosticsServiceBaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DiagnosticsServiceBaseDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n DocumentParserDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class DocumentParserDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DocumentParserDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document parser\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentParserDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class DocumentParserDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DocumentParserDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document parser\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentParserDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DocumentParserDefinitionTests\r\n DocumentParserDefinitionTestsClass\r\n \r\n ClassDocumentParserDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DocumentParserDefinitionTests\r\n 0\r\n DocumentParserDefinitionTests.cs\r\n DocumentParserDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DocumentParserDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Site Collection Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Event Receivers\r\n Event Receivers\r\n \r\n \r\n \r\n EventReceiverDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class EventReceiverDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.EventReceiverDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add event receiver to site\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySiteEventReceiverDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add event receiver to web\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebSimpleEventReceiverDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add event receiver to list\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListSimpleEventReceiverDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add event receiver to content type\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentTypeSimpleEventReceiverDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class EventReceiverDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.EventReceiverDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add event receiver to site\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySiteEventReceiverDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add event receiver to web\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebSimpleEventReceiverDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add event receiver to list\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListSimpleEventReceiverDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add event receiver to content type\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentTypeSimpleEventReceiverDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n EventReceiverDefinitionTests\r\n EventReceiverDefinitionTestsClass\r\n \r\n ClassEventReceiverDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.EventReceiverDefinitionTests\r\n 0\r\n EventReceiverDefinitionTests.cs\r\n EventReceiverDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\EventReceiverDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n FarmDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FarmDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm feature\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FarmDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm feature\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmDefinitionTests\r\n FarmDefinitionTestsClass\r\n \r\n ClassFarmDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests\r\n 0\r\n FarmDefinitionTests.cs\r\n FarmDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n FarmSolutionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FarmSolutionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FarmSolutionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmSolutionDefinitionTests\r\n FarmSolutionDefinitionTestsClass\r\n \r\n ClassFarmSolutionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests\r\n 0\r\n FarmSolutionDefinitionTests.cs\r\n FarmSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmSolutionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n Features\r\n \r\n \r\n \r\n FeatureDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FeatureDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB site features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n \r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Disable OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Activate custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Disable custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Inherit OOTB features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FeatureDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB site features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Disable OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Activate custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Disable custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Inherit OOTB features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n FeatureDefinitionTestsClass\r\n \r\n ClassFeatureDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n FieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n public class FieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region by scope\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to site\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to web\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to list\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n\r\n\r\n #region typed fields\r\n\r\n\r\n #endregion\r\n }\r\n public class FieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region by scope\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to site\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to web\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to list\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n\r\n\r\n #region typed fields\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n FieldDefinitionTestsClass\r\n \r\n ClassFieldDefinitionTestsClass\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n FolderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class FolderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n [SampleMetadata(Title = \"Add folders to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder hierarchy to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FolderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n [SampleMetadata(Title = \"Add folders to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder hierarchy to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n FolderDefinitionTestsClass\r\n \r\n ClassFolderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n GuidFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class GuidFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.GuidFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add guid field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class GuidFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.GuidFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add guid field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n GuidFieldDefinitionTests\r\n GuidFieldDefinitionTestsClass\r\n \r\n ClassGuidFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests\r\n 0\r\n GuidFieldDefinitionTests.cs\r\n GuidFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\GuidFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n HideContentTypeFieldLinksDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class HideContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HideContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class HideContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HideContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HideContentTypeFieldLinksDefinitionTests\r\n HideContentTypeFieldLinksDefinitionTestsClass\r\n \r\n ClassHideContentTypeFieldLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests\r\n 0\r\n HideContentTypeFieldLinksDefinitionTests.cs\r\n HideContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\HideContentTypeFieldLinksDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n FarmDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FarmDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm feature\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FarmDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm feature\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmDefinitionTests\r\n FarmDefinitionTestsClass\r\n \r\n ClassFarmDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests\r\n 0\r\n FarmDefinitionTests.cs\r\n FarmDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n FarmSolutionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FarmSolutionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FarmSolutionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmSolutionDefinitionTests\r\n FarmSolutionDefinitionTestsClass\r\n \r\n ClassFarmSolutionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests\r\n 0\r\n FarmSolutionDefinitionTests.cs\r\n FarmSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmSolutionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n Features\r\n \r\n \r\n \r\n FeatureDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FeatureDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB site features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n \r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Disable OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Activate custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Disable custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Inherit OOTB features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FeatureDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB site features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Disable OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Activate custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Disable custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Inherit OOTB features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n FeatureDefinitionTestsClass\r\n \r\n ClassFeatureDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n FieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n public class FieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region by scope\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to site\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to web\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to list\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n\r\n\r\n #region typed fields\r\n\r\n\r\n #endregion\r\n }\r\n public class FieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region by scope\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to site\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to web\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to list\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n\r\n\r\n #region typed fields\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n FieldDefinitionTestsClass\r\n \r\n ClassFieldDefinitionTestsClass\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n FolderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class FolderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n [SampleMetadata(Title = \"Add folders to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder hierarchy to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FolderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n [SampleMetadata(Title = \"Add folders to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder hierarchy to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n FolderDefinitionTestsClass\r\n \r\n ClassFolderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n GuidFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class GuidFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.GuidFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add guid field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class GuidFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.GuidFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add guid field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n GuidFieldDefinitionTests\r\n GuidFieldDefinitionTestsClass\r\n \r\n ClassGuidFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests\r\n 0\r\n GuidFieldDefinitionTests.cs\r\n GuidFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\GuidFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n HideContentTypeFieldLinksDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class HideContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HideContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class HideContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HideContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HideContentTypeFieldLinksDefinitionTests\r\n HideContentTypeFieldLinksDefinitionTestsClass\r\n \r\n ClassHideContentTypeFieldLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests\r\n 0\r\n HideContentTypeFieldLinksDefinitionTests.cs\r\n HideContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\HideContentTypeFieldLinksDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n HideContentTypeLinksDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class HideContentTypeLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HideContentTypeLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Hide content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypesInList()\r\n {\r\n var newAnnualReportContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Annual Report 2015\",\r\n Id = new Guid(\"7B3378FF-11DF-430B-830F-C63FABA4712F\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var oldAnnualReportContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Annual Report 2014\",\r\n Id = new Guid(\"DEB586C5-ED08-4D06-98F6-9FC5002986D2\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(newAnnualReportContentType)\r\n .AddContentType(oldAnnualReportContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(newAnnualReportContentType)\r\n .AddContentTypeLink(oldAnnualReportContentType)\r\n .AddHideContentTypeLinks(new HideContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\" },\r\n new ContentTypeLinkValue{ ContentTypeName = oldAnnualReportContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class HideContentTypeLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HideContentTypeLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Hide content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypesInList()\r\n {\r\n var newAnnualReportContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Annual Report 2015\",\r\n Id = new Guid(\"7B3378FF-11DF-430B-830F-C63FABA4712F\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var oldAnnualReportContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Annual Report 2014\",\r\n Id = new Guid(\"DEB586C5-ED08-4D06-98F6-9FC5002986D2\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(newAnnualReportContentType)\r\n .AddContentType(oldAnnualReportContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(newAnnualReportContentType)\r\n .AddContentTypeLink(oldAnnualReportContentType)\r\n .AddHideContentTypeLinks(new HideContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\" },\r\n new ContentTypeLinkValue{ ContentTypeName = oldAnnualReportContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HideContentTypeLinksDefinitionTests\r\n HideContentTypeLinksDefinitionTestsClass\r\n \r\n ClassHideContentTypeLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeLinksDefinitionTests\r\n 0\r\n HideContentTypeLinksDefinitionTests.cs\r\n HideContentTypeLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\HideContentTypeLinksDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n InformationRightsManagementSettingsDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class InformationRightsManagementSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.InformationRightsManagementSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add IRM settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class InformationRightsManagementSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.InformationRightsManagementSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add IRM settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n InformationRightsManagementSettingsDefinitionTests\r\n InformationRightsManagementSettingsDefinitionTestsClass\r\n \r\n ClassInformationRightsManagementSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests\r\n 0\r\n InformationRightsManagementSettingsDefinitionTests.cs\r\n InformationRightsManagementSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\InformationRightsManagementSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n JobDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class JobDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JobDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add timer job\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class JobDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JobDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add timer job\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JobDefinitionTests\r\n JobDefinitionTestsClass\r\n \r\n ClassJobDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests\r\n 0\r\n JobDefinitionTests.cs\r\n JobDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\JobDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host Style Library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host OOTB lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multiple lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add promoted links list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host Style Library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host OOTB lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multiple lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add promoted links list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n ListDefinitionTestsClass\r\n \r\n ClassListDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListFieldLinkDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListFieldLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListFieldLinkDefinition\")]\r\n [SampleMetadata(Title = \"Add field links to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListFieldLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListFieldLinkDefinition\")]\r\n [SampleMetadata(Title = \"Add field links to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListFieldLinkDefinitionTests\r\n ListFieldLinkDefinitionTestsClass\r\n \r\n ClassListFieldLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests\r\n 0\r\n ListFieldLinkDefinitionTests.cs\r\n ListFieldLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListFieldLinkDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n InformationRightsManagementSettingsDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class InformationRightsManagementSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.InformationRightsManagementSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add IRM settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class InformationRightsManagementSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.InformationRightsManagementSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add IRM settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n InformationRightsManagementSettingsDefinitionTests\r\n InformationRightsManagementSettingsDefinitionTestsClass\r\n \r\n ClassInformationRightsManagementSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests\r\n 0\r\n InformationRightsManagementSettingsDefinitionTests.cs\r\n InformationRightsManagementSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\InformationRightsManagementSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n JobDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class JobDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JobDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add timer job\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class JobDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JobDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add timer job\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JobDefinitionTests\r\n JobDefinitionTestsClass\r\n \r\n ClassJobDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests\r\n 0\r\n JobDefinitionTests.cs\r\n JobDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\JobDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n ListDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host Style Library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host OOTB lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multiple lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add promoted links list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host Style Library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host OOTB lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multiple lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add promoted links list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n ListDefinitionTestsClass\r\n \r\n ClassListDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n ListFieldLinkDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListFieldLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListFieldLinkDefinition\")]\r\n [SampleMetadata(Title = \"Add field links to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListFieldLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListFieldLinkDefinition\")]\r\n [SampleMetadata(Title = \"Add field links to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListFieldLinkDefinitionTests\r\n ListFieldLinkDefinitionTestsClass\r\n \r\n ClassListFieldLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests\r\n 0\r\n ListFieldLinkDefinitionTests.cs\r\n ListFieldLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListFieldLinkDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListItemDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListItemDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListItemDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list item\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListItemDefinition()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list\r\n .AddListItem(new ListItemDefinition { Title = \"Microsoft\" })\r\n .AddListItem(new ListItemDefinition { Title = \"Apple\" })\r\n .AddListItem(new ListItemDefinition { Title = \"IBM\" });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListItemDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListItemDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list item\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListItemDefinition()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list\r\n .AddListItem(new ListItemDefinition { Title = \"Microsoft\" })\r\n .AddListItem(new ListItemDefinition { Title = \"Apple\" })\r\n .AddListItem(new ListItemDefinition { Title = \"IBM\" });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListItemDefinitionTests\r\n ListItemDefinitionTestsClass\r\n \r\n ClassListItemDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemDefinitionTests\r\n 0\r\n ListItemDefinitionTests.cs\r\n ListItemDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListItemDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n ListItemFieldValueDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListItemFieldValueDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListItemFieldValueDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list item field value\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListItemFieldValueDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListItemFieldValueDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list item field value\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListItemFieldValueDefinitionTests\r\n ListItemFieldValueDefinitionTestsClass\r\n \r\n ClassListItemFieldValueDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests\r\n 0\r\n ListItemFieldValueDefinitionTests.cs\r\n ListItemFieldValueDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListItemFieldValueDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n Lists views\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListViewDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListViewDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view with URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n [SampleMetadata(Title = \"Add list view with CAML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListViewDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view with URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n [SampleMetadata(Title = \"Add list view with CAML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n ListViewDefinitionTestsClass\r\n \r\n ClassListViewDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListViewWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListViewWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to calendar view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListViewWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to calendar view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n ListViewWebPartDefinitionTestsClass\r\n \r\n ClassListViewWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n LookupFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class LookupFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field binded to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class LookupFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field binded to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n LookupFieldDefinitionTestsClass\r\n \r\n ClassLookupFieldDefinitionTestsClass\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListItemFieldValueDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListItemFieldValueDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListItemFieldValueDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list item field value\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListItemFieldValueDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListItemFieldValueDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list item field value\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListItemFieldValueDefinitionTests\r\n ListItemFieldValueDefinitionTestsClass\r\n \r\n ClassListItemFieldValueDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests\r\n 0\r\n ListItemFieldValueDefinitionTests.cs\r\n ListItemFieldValueDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListItemFieldValueDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n Lists views\r\n \r\n \r\n \r\n ListViewDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListViewDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view with URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n [SampleMetadata(Title = \"Add list view with CAML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListViewDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view with URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n [SampleMetadata(Title = \"Add list view with CAML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n ListViewDefinitionTestsClass\r\n \r\n ClassListViewDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ListViewWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListViewWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to calendar view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListViewWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to calendar view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n ListViewWebPartDefinitionTestsClass\r\n \r\n ClassListViewWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n LookupFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class LookupFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field binded to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class LookupFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field binded to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n LookupFieldDefinitionTestsClass\r\n \r\n ClassLookupFieldDefinitionTestsClass\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n ManagedAccountDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ManagedAccountDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ManagedAccountDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add managed account\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleManagedAccountDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ManagedAccountDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ManagedAccountDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add managed account\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleManagedAccountDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ManagedAccountDefinitionTests\r\n ManagedAccountDefinitionTestsClass\r\n \r\n ClassManagedAccountDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ManagedAccountDefinitionTests\r\n 0\r\n ManagedAccountDefinitionTests.cs\r\n ManagedAccountDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ManagedAccountDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n Master page gallery\r\n \r\n \r\n \r\n MasterPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class MasterPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add master page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class MasterPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add master page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MasterPageDefinitionTests\r\n MasterPageDefinitionTestsClass\r\n \r\n ClassMasterPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests\r\n 0\r\n MasterPageDefinitionTests.cs\r\n MasterPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MasterPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n Master page gallery\r\n \r\n \r\n \r\n MasterPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class MasterPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add master page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class MasterPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add master page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MasterPageDefinitionTests\r\n MasterPageDefinitionTestsClass\r\n \r\n ClassMasterPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests\r\n 0\r\n MasterPageDefinitionTests.cs\r\n MasterPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MasterPageDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n MasterPageSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class MasterPageSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add master page setting\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebmasterPageSettings()\r\n {\r\n // BuiltInMasterPageDefinitions class could be used to refer OOTB master pages\r\n // BuiltInMasterPageDefinitions.Seattle \r\n // BuiltInMasterPageDefinitions.Oslo \r\n // BuiltInMasterPageDefinitions.Minimal \r\n\r\n var masterPageSettings = new MasterPageSettingsDefinition\r\n {\r\n // both should be site relative URLs\r\n SiteMasterPageUrl = \"/_catalogs/masterpage/oslo.master\",\r\n SystemMasterPageUrl = \"/_catalogs/masterpage/oslo.master\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddMasterPageSettings(masterPageSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class MasterPageSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add master page setting\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebmasterPageSettings()\r\n {\r\n // BuiltInMasterPageDefinitions class could be used to refer OOTB master pages\r\n // BuiltInMasterPageDefinitions.Seattle\r\n // BuiltInMasterPageDefinitions.Oslo\r\n // BuiltInMasterPageDefinitions.Minimal\r\n\r\n var masterPageSettings = new MasterPageSettingsDefinition\r\n {\r\n // both should be site relative URLs\r\n SiteMasterPageUrl = \"/_catalogs/masterpage/oslo.master\",\r\n SystemMasterPageUrl = \"/_catalogs/masterpage/oslo.master\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddMasterPageSettings(masterPageSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MasterPageSettingsDefinitionTests\r\n MasterPageSettingsDefinitionTestsClass\r\n \r\n ClassMasterPageSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageSettingsDefinitionTests\r\n 0\r\n MasterPageSettingsDefinitionTests.cs\r\n MasterPageSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MasterPageSettingsDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Module files\r\n Module files\r\n \r\n \r\n \r\n ModuleFileDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ModuleFileDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ModuleFileDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add module file to Style Library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployModuleFilesToStyleLibrary()\r\n {\r\n var cssFile = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-styles.css\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\".m2-content { padding:10px; border:1px red solid; } \")\r\n };\r\n\r\n var jsFile = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-app.js\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\" alert(\'hello, m2!\'); \")\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list\r\n .AddModuleFile(cssFile)\r\n .AddModuleFile(jsFile);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ModuleFileDefinition\")]\r\n [SampleMetadata(Title = \"Add module file to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployModuleFilesToFolders()\r\n {\r\n var cssFile = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-red.css\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\".m2-red { color:red; } \")\r\n };\r\n\r\n var jsFile = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-logger-module.js\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\" function(msg) { console.log(msg); } \")\r\n };\r\n\r\n var cssFolder = new FolderDefinition\r\n {\r\n Name = \"m2-css\"\r\n };\r\n\r\n var jsFolder = new FolderDefinition\r\n {\r\n Name = \"m2-js\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list\r\n .AddFolder(cssFolder, folder =>\r\n {\r\n folder.AddModuleFile(cssFile);\r\n })\r\n .AddFolder(jsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jsFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ModuleFileDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ModuleFileDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add module file to Style Library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployModuleFilesToStyleLibrary()\r\n {\r\n var cssFile = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-styles.css\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\".m2-content { padding:10px; border:1px red solid; } \")\r\n };\r\n\r\n var jsFile = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-app.js\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\" alert(\'hello, m2!\'); \")\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list\r\n .AddModuleFile(cssFile)\r\n .AddModuleFile(jsFile);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ModuleFileDefinition\")]\r\n [SampleMetadata(Title = \"Add module file to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployModuleFilesToFolders()\r\n {\r\n var cssFile = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-red.css\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\".m2-red { color:red; } \")\r\n };\r\n\r\n var jsFile = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-logger-module.js\",\r\n Overwrite = true,\r\n Content = Encoding.UTF8.GetBytes(\" function(msg) { console.log(msg); } \")\r\n };\r\n\r\n var cssFolder = new FolderDefinition\r\n {\r\n Name = \"m2-css\"\r\n };\r\n\r\n var jsFolder = new FolderDefinition\r\n {\r\n Name = \"m2-js\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list\r\n .AddFolder(cssFolder, folder =>\r\n {\r\n folder.AddModuleFile(cssFile);\r\n })\r\n .AddFolder(jsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jsFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ModuleFileDefinitionTests\r\n ModuleFileDefinitionTestsClass\r\n \r\n ClassModuleFileDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ModuleFileDefinitionTests\r\n 0\r\n ModuleFileDefinitionTests.cs\r\n ModuleFileDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ModuleFileDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n MultiChoiceFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class MultiChoiceFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MultiChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multichoice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class MultiChoiceFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MultiChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multichoice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MultiChoiceFieldDefinitionTests\r\n MultiChoiceFieldDefinitionTestsClass\r\n \r\n ClassMultiChoiceFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests\r\n 0\r\n MultiChoiceFieldDefinitionTests.cs\r\n MultiChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MultiChoiceFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n NoteFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class NoteFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NoteFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add note field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class NoteFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NoteFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add note field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NoteFieldDefinitionTests\r\n NoteFieldDefinitionTestsClass\r\n \r\n ClassNoteFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests\r\n 0\r\n NoteFieldDefinitionTests.cs\r\n NoteFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NoteFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n NumberFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class NumberFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NumberFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add number field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class NumberFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NumberFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add number field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NumberFieldDefinitionTests\r\n NumberFieldDefinitionTestsClass\r\n \r\n ClassNumberFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests\r\n 0\r\n NumberFieldDefinitionTests.cs\r\n NumberFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NumberFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n PrefixDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PrefixDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PrefixDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add prefix\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PrefixDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PrefixDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add prefix\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PrefixDefinitionTests\r\n PrefixDefinitionTestsClass\r\n \r\n ClassPrefixDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests\r\n 0\r\n PrefixDefinitionTests.cs\r\n PrefixDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PrefixDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n Property bags\r\n \r\n \r\n \r\n PropertyDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PropertyDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to farm\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669 \r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PropertyDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to farm\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669\r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n PropertyDefinitionTestsClass\r\n \r\n ClassPropertyDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n MultiChoiceFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class MultiChoiceFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MultiChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multichoice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class MultiChoiceFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MultiChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multichoice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MultiChoiceFieldDefinitionTests\r\n MultiChoiceFieldDefinitionTestsClass\r\n \r\n ClassMultiChoiceFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests\r\n 0\r\n MultiChoiceFieldDefinitionTests.cs\r\n MultiChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MultiChoiceFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n NoteFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class NoteFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NoteFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add note field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class NoteFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NoteFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add note field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NoteFieldDefinitionTests\r\n NoteFieldDefinitionTestsClass\r\n \r\n ClassNoteFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests\r\n 0\r\n NoteFieldDefinitionTests.cs\r\n NoteFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NoteFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n NumberFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class NumberFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NumberFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add number field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class NumberFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NumberFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add number field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NumberFieldDefinitionTests\r\n NumberFieldDefinitionTestsClass\r\n \r\n ClassNumberFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests\r\n 0\r\n NumberFieldDefinitionTests.cs\r\n NumberFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NumberFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n PrefixDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PrefixDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PrefixDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add prefix\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PrefixDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PrefixDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add prefix\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PrefixDefinitionTests\r\n PrefixDefinitionTestsClass\r\n \r\n ClassPrefixDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests\r\n 0\r\n PrefixDefinitionTests.cs\r\n PrefixDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PrefixDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n PropertyDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PropertyDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to farm\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669 \r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PropertyDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to farm\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669\r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n PropertyDefinitionTestsClass\r\n \r\n ClassPropertyDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n Navigation\r\n \r\n \r\n \r\n QuickLaunchNavigationNodeDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class QuickLaunchNavigationNodeDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.QuickLaunchNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add quick nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CaDeployFlatQuickLaunchNavigation()\r\n {\r\n var aboutUs = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"About us\",\r\n Url = \"about-us.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var services = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Services\",\r\n Url = \"services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var contacts = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Contacts\",\r\n Url = \"contacts.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddQuickLaunchNavigationNode(aboutUs)\r\n .AddQuickLaunchNavigationNode(services)\r\n .AddQuickLaunchNavigationNode(contacts);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.QuickLaunchNavigationNodeDefinition\")]\r\n [SampleMetadata(Title = \"Add hierarchical quick nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalQuickLaunchNavigation()\r\n {\r\n // top level departments node\r\n var departments = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Departments\",\r\n Url = \"departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"HR\",\r\n Url = \"hr.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"IT\",\r\n Url = \"it.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var clients = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Clients\",\r\n Url = \"clients.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddQuickLaunchNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddQuickLaunchNavigationNode(hr)\r\n .AddQuickLaunchNavigationNode(it);\r\n })\r\n .AddQuickLaunchNavigationNode(clients, node =>\r\n {\r\n node\r\n .AddQuickLaunchNavigationNode(microsoft)\r\n .AddQuickLaunchNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class QuickLaunchNavigationNodeDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.QuickLaunchNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add quick nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CaDeployFlatQuickLaunchNavigation()\r\n {\r\n var aboutUs = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"About us\",\r\n Url = \"about-us.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var services = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Services\",\r\n Url = \"services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var contacts = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Contacts\",\r\n Url = \"contacts.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddQuickLaunchNavigationNode(aboutUs)\r\n .AddQuickLaunchNavigationNode(services)\r\n .AddQuickLaunchNavigationNode(contacts);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.QuickLaunchNavigationNodeDefinition\")]\r\n [SampleMetadata(Title = \"Add hierarchical quick nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalQuickLaunchNavigation()\r\n {\r\n // top level departments node\r\n var departments = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Departments\",\r\n Url = \"departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"HR\",\r\n Url = \"hr.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"IT\",\r\n Url = \"it.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var clients = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Clients\",\r\n Url = \"clients.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new QuickLaunchNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddQuickLaunchNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddQuickLaunchNavigationNode(hr)\r\n .AddQuickLaunchNavigationNode(it);\r\n })\r\n .AddQuickLaunchNavigationNode(clients, node =>\r\n {\r\n node\r\n .AddQuickLaunchNavigationNode(microsoft)\r\n .AddQuickLaunchNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n QuickLaunchNavigationNodeDefinitionTests\r\n QuickLaunchNavigationNodeDefinitionTestsClass\r\n \r\n ClassQuickLaunchNavigationNodeDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.QuickLaunchNavigationNodeDefinitionTests\r\n 0\r\n QuickLaunchNavigationNodeDefinitionTests.cs\r\n QuickLaunchNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\QuickLaunchNavigationNodeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n RegionalSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RegionalSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RegionalSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add regional settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RegionalSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RegionalSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add regional settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RegionalSettingsDefinitionTests\r\n RegionalSettingsDefinitionTestsClass\r\n \r\n ClassRegionalSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests\r\n 0\r\n RegionalSettingsDefinitionTests.cs\r\n RegionalSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RegionalSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n RemoveContentTypeFieldLinksDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RemoveContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove fields from content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RemoveContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove fields from content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n RemoveContentTypeFieldLinksDefinitionTestsClass\r\n \r\n ClassRemoveContentTypeFieldLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests\r\n 0\r\n RemoveContentTypeFieldLinksDefinitionTests.cs\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeFieldLinksDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n RemoveContentTypeLinksDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RemoveContentTypeLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove content types from lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RemoveContentTypeLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove content types from lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeLinksDefinitionTests\r\n RemoveContentTypeLinksDefinitionTestsClass\r\n \r\n ClassRemoveContentTypeLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests\r\n 0\r\n RemoveContentTypeLinksDefinitionTests.cs\r\n RemoveContentTypeLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeLinksDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n ResetRoleInheritanceDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ResetRoleInheritanceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ResetRoleInheritanceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n ResetRoleInheritanceDefinitionTestsClass\r\n \r\n ClassResetRoleInheritanceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n RegionalSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RegionalSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RegionalSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add regional settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RegionalSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RegionalSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add regional settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RegionalSettingsDefinitionTests\r\n RegionalSettingsDefinitionTestsClass\r\n \r\n ClassRegionalSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests\r\n 0\r\n RegionalSettingsDefinitionTests.cs\r\n RegionalSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RegionalSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n RemoveContentTypeFieldLinksDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RemoveContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove fields from content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RemoveContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove fields from content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n RemoveContentTypeFieldLinksDefinitionTestsClass\r\n \r\n ClassRemoveContentTypeFieldLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests\r\n 0\r\n RemoveContentTypeFieldLinksDefinitionTests.cs\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeFieldLinksDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n RemoveContentTypeLinksDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RemoveContentTypeLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove content types from lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RemoveContentTypeLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove content types from lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeLinksDefinitionTests\r\n RemoveContentTypeLinksDefinitionTestsClass\r\n \r\n ClassRemoveContentTypeLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests\r\n 0\r\n RemoveContentTypeLinksDefinitionTests.cs\r\n RemoveContentTypeLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeLinksDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n ResetRoleInheritanceDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ResetRoleInheritanceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ResetRoleInheritanceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n ResetRoleInheritanceDefinitionTestsClass\r\n \r\n ClassResetRoleInheritanceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Root web\r\n Root web\r\n \r\n \r\n \r\n RootWebDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RootWebDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RootWebDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Update root web Title/Description\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanUpdateRootWebProperties()\r\n {\r\n var rootWeb = new RootWebDefinition\r\n {\r\n Title = \"M2 CRM\",\r\n Description = \"Custom CRM application build on top of M2 framework.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddRootWeb(rootWeb);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RootWebDefinition\")]\r\n [SampleMetadata(Title = \"Add lists to root web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanProvisionRootWebLists()\r\n {\r\n var rootWeb = new RootWebDefinition\r\n {\r\n\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddRootWeb(rootWeb, web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff with \'Style Library\'\r\n })\r\n .AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff with \'Master Page Library\'\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RootWebDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RootWebDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Update root web Title/Description\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanUpdateRootWebProperties()\r\n {\r\n var rootWeb = new RootWebDefinition\r\n {\r\n Title = \"M2 CRM\",\r\n Description = \"Custom CRM application build on top of M2 framework.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddRootWeb(rootWeb);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RootWebDefinition\")]\r\n [SampleMetadata(Title = \"Add lists to root web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanProvisionRootWebLists()\r\n {\r\n var rootWeb = new RootWebDefinition\r\n {\r\n\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddRootWeb(rootWeb, web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff with \'Style Library\'\r\n })\r\n .AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff with \'Master Page Library\'\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RootWebDefinitionTests\r\n RootWebDefinitionTestsClass\r\n \r\n ClassRootWebDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RootWebDefinitionTests\r\n 0\r\n RootWebDefinitionTests.cs\r\n RootWebDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RootWebDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n SandboxSolutionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SandboxSolutionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SandboxSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add sandbox solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n \r\n // Content is a byte array, so get ot from whatever source you want\r\n \r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n \r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SandboxSolutionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SandboxSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add sandbox solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n\r\n // Content is a byte array, so get ot from whatever source you want\r\n\r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n\r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SandboxSolutionDefinitionTests\r\n SandboxSolutionDefinitionTestsClass\r\n \r\n ClassSandboxSolutionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests\r\n 0\r\n SandboxSolutionDefinitionTests.cs\r\n SandboxSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SandboxSolutionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ScriptEditorWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ScriptEditorWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ScriptEditorWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n ScriptEditorWebPartDefinitionTestsClass\r\n \r\n ClassScriptEditorWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SecureStoreApplicationDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class SecureStoreApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecureStoreApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add secure store application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class SecureStoreApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecureStoreApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add secure store application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecureStoreApplicationDefinitionTests\r\n SecureStoreApplicationDefinitionTestsClass\r\n \r\n ClassSecureStoreApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests\r\n 0\r\n SecureStoreApplicationDefinitionTests.cs\r\n SecureStoreApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecureStoreApplicationDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n SecurityGroupDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SecurityGroupDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add multiple security groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SecurityGroupDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add multiple security groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n SecurityGroupDefinitionTestsClass\r\n \r\n ClassSecurityGroupDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SecurityGroupLinkDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class SecurityGroupLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Assign security group to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n [SampleMetadata(Title = \"Assign security group to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class SecurityGroupLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Assign security group to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n [SampleMetadata(Title = \"Assign security group to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n SecurityGroupLinkDefinitionTestsClass\r\n \r\n ClassSecurityGroupLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n SecurityRoleDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SecurityRoleDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityRoleDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security role\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SecurityRoleDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityRoleDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security role\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityRoleDefinitionTests\r\n SecurityRoleDefinitionTestsClass\r\n \r\n ClassSecurityRoleDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests\r\n 0\r\n SecurityRoleDefinitionTests.cs\r\n SecurityRoleDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityRoleDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SandboxSolutionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SandboxSolutionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SandboxSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add sandbox solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n \r\n // Content is a byte array, so get ot from whatever source you want\r\n \r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n \r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SandboxSolutionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SandboxSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add sandbox solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n\r\n // Content is a byte array, so get ot from whatever source you want\r\n\r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n\r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SandboxSolutionDefinitionTests\r\n SandboxSolutionDefinitionTestsClass\r\n \r\n ClassSandboxSolutionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests\r\n 0\r\n SandboxSolutionDefinitionTests.cs\r\n SandboxSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SandboxSolutionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ScriptEditorWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ScriptEditorWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ScriptEditorWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n ScriptEditorWebPartDefinitionTestsClass\r\n \r\n ClassScriptEditorWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SecureStoreApplicationDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class SecureStoreApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecureStoreApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add secure store application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class SecureStoreApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecureStoreApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add secure store application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecureStoreApplicationDefinitionTests\r\n SecureStoreApplicationDefinitionTestsClass\r\n \r\n ClassSecureStoreApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests\r\n 0\r\n SecureStoreApplicationDefinitionTests.cs\r\n SecureStoreApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecureStoreApplicationDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n SecurityGroupDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SecurityGroupDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add multiple security groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SecurityGroupDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add multiple security groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n SecurityGroupDefinitionTestsClass\r\n \r\n ClassSecurityGroupDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SecurityGroupLinkDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class SecurityGroupLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Assign security group to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n [SampleMetadata(Title = \"Assign security group to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class SecurityGroupLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Assign security group to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n [SampleMetadata(Title = \"Assign security group to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n SecurityGroupLinkDefinitionTestsClass\r\n \r\n ClassSecurityGroupLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SecurityRoleDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SecurityRoleDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityRoleDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security role\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SecurityRoleDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityRoleDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security role\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityRoleDefinitionTests\r\n SecurityRoleDefinitionTestsClass\r\n \r\n ClassSecurityRoleDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests\r\n 0\r\n SecurityRoleDefinitionTests.cs\r\n SecurityRoleDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityRoleDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n SecurityRoleLinkDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SecurityRoleLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityRoleLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security role link\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n\r\n public void CanDeploySimpleSecurityRoleLinkDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SecurityRoleLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityRoleLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security role link\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n\r\n public void CanDeploySimpleSecurityRoleLinkDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityRoleLinkDefinitionTests\r\n SecurityRoleLinkDefinitionTestsClass\r\n \r\n ClassSecurityRoleLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleLinkDefinitionTests\r\n 0\r\n SecurityRoleLinkDefinitionTests.cs\r\n SecurityRoleLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityRoleLinkDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n SiteDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SiteDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add site\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SiteDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add site\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteDefinitionTests\r\n SiteDefinitionTestsClass\r\n \r\n ClassSiteDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests\r\n 0\r\n SiteDefinitionTests.cs\r\n SiteDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SiteDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n SiteDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SiteDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add site\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SiteDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add site\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteDefinitionTests\r\n SiteDefinitionTestsClass\r\n \r\n ClassSiteDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests\r\n 0\r\n SiteDefinitionTests.cs\r\n SiteDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SiteDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n SharePoint 2013 workflow\r\n SharePoint 2013 workflow\r\n \r\n \r\n \r\n SP2013WorkflowDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SP2013WorkflowDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.SP2013WorkflowDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add SP2013 workflow\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSP2013WorkflowDefinition()\r\n {\r\n var writeToHistoryLstWorkflow = new SP2013WorkflowDefinition\r\n {\r\n DisplayName = \"M2 - Write to history list\",\r\n Override = true,\r\n Xaml = WorkflowTemplates.WriteToHistoryListWorkflow\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddSP2013Workflow(writeToHistoryLstWorkflow);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SP2013WorkflowDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SP2013WorkflowDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add SP2013 workflow\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSP2013WorkflowDefinition()\r\n {\r\n var writeToHistoryLstWorkflow = new SP2013WorkflowDefinition\r\n {\r\n DisplayName = \"M2 - Write to history list\",\r\n Override = true,\r\n Xaml = WorkflowTemplates.WriteToHistoryListWorkflow\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddSP2013Workflow(writeToHistoryLstWorkflow);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SP2013WorkflowDefinitionTests\r\n SP2013WorkflowDefinitionTestsClass\r\n \r\n ClassSP2013WorkflowDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SP2013WorkflowDefinitionTests\r\n 0\r\n SP2013WorkflowDefinitionTests.cs\r\n SP2013WorkflowDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SP2013WorkflowDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n SharePoint 2013 workflow\r\n SharePoint 2013 workflow\r\n \r\n \r\n \r\n SP2013WorkflowSubscriptionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SP2013WorkflowSubscriptionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [SampleMetadata(Title = \"Add SP2013 workflow to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSP2013WorkflowSubscriptionToWeb()\r\n {\r\n var writeToHistoryListWorkflow = new SP2013WorkflowDefinition\r\n {\r\n DisplayName = \"M2 - Write to history list\",\r\n Override = true,\r\n Xaml = WorkflowTemplates.WriteToHistoryListWorkflow\r\n };\r\n\r\n var taskList = new ListDefinition\r\n {\r\n Title = \"Write To History List Tasks\",\r\n TemplateType = BuiltInListTemplateTypeId.Tasks,\r\n Url = \"m2WriteToHistoryListTasks\"\r\n };\r\n\r\n var historyList = new ListDefinition\r\n {\r\n Title = \"Write To History List History\",\r\n TemplateType = BuiltInListTemplateTypeId.WorkflowHistory,\r\n Url = \"m2WriteToHistoryListHistory\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddSP2013Workflow(writeToHistoryListWorkflow)\r\n .AddList(historyList)\r\n .AddList(taskList)\r\n .AddSP2013WorkflowSubscription(new SP2013WorkflowSubscriptionDefinition\r\n {\r\n Name = \"Write To History Web Workflow\",\r\n WorkflowDisplayName = writeToHistoryListWorkflow.DisplayName,\r\n HistoryListUrl = historyList.GetListUrl(),\r\n TaskListUrl = taskList.GetListUrl()\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SP2013WorkflowSubscriptionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add SP2013 workflow to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSP2013WorkflowSubscriptionToList()\r\n {\r\n var writeToHistoryListWorkflow = new SP2013WorkflowDefinition\r\n {\r\n DisplayName = \"M2 - Write to history list\",\r\n Override = true,\r\n Xaml = WorkflowTemplates.WriteToHistoryListWorkflow\r\n };\r\n\r\n var taskList = new ListDefinition\r\n {\r\n Title = \"Workflow Enabled List Tasks\",\r\n TemplateType = BuiltInListTemplateTypeId.Tasks,\r\n Url = \"m2WorkflowEnabledListTasks\"\r\n };\r\n\r\n var historyList = new ListDefinition\r\n {\r\n Title = \"Workflow Enabled List History\",\r\n TemplateType = BuiltInListTemplateTypeId.WorkflowHistory,\r\n Url = \"m2WorkflowEnabledListHistory\"\r\n };\r\n\r\n var workflowEnabledList = new ListDefinition\r\n {\r\n Title = \"Workflow Enabled List\",\r\n Description = \"Workflow enabled list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"WorkflowEnabledList\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddSP2013Workflow(writeToHistoryListWorkflow)\r\n .AddList(historyList)\r\n .AddList(taskList)\r\n .AddList(workflowEnabledList, list =>\r\n {\r\n list\r\n .AddSP2013WorkflowSubscription(new SP2013WorkflowSubscriptionDefinition\r\n {\r\n Name = \"Write To History List Workflow\",\r\n WorkflowDisplayName = writeToHistoryListWorkflow.DisplayName,\r\n HistoryListUrl = historyList.GetListUrl(),\r\n TaskListUrl = taskList.GetListUrl()\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SP2013WorkflowSubscriptionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [SampleMetadata(Title = \"Add SP2013 workflow to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSP2013WorkflowSubscriptionToWeb()\r\n {\r\n var writeToHistoryListWorkflow = new SP2013WorkflowDefinition\r\n {\r\n DisplayName = \"M2 - Write to history list\",\r\n Override = true,\r\n Xaml = WorkflowTemplates.WriteToHistoryListWorkflow\r\n };\r\n\r\n var taskList = new ListDefinition\r\n {\r\n Title = \"Write To History List Tasks\",\r\n TemplateType = BuiltInListTemplateTypeId.Tasks,\r\n Url = \"m2WriteToHistoryListTasks\"\r\n };\r\n\r\n var historyList = new ListDefinition\r\n {\r\n Title = \"Write To History List History\",\r\n TemplateType = BuiltInListTemplateTypeId.WorkflowHistory,\r\n Url = \"m2WriteToHistoryListHistory\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddSP2013Workflow(writeToHistoryListWorkflow)\r\n .AddList(historyList)\r\n .AddList(taskList)\r\n .AddSP2013WorkflowSubscription(new SP2013WorkflowSubscriptionDefinition\r\n {\r\n Name = \"Write To History Web Workflow\",\r\n WorkflowDisplayName = writeToHistoryListWorkflow.DisplayName,\r\n HistoryListUrl = historyList.GetListUrl(),\r\n TaskListUrl = taskList.GetListUrl()\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SP2013WorkflowSubscriptionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add SP2013 workflow to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSP2013WorkflowSubscriptionToList()\r\n {\r\n var writeToHistoryListWorkflow = new SP2013WorkflowDefinition\r\n {\r\n DisplayName = \"M2 - Write to history list\",\r\n Override = true,\r\n Xaml = WorkflowTemplates.WriteToHistoryListWorkflow\r\n };\r\n\r\n var taskList = new ListDefinition\r\n {\r\n Title = \"Workflow Enabled List Tasks\",\r\n TemplateType = BuiltInListTemplateTypeId.Tasks,\r\n Url = \"m2WorkflowEnabledListTasks\"\r\n };\r\n\r\n var historyList = new ListDefinition\r\n {\r\n Title = \"Workflow Enabled List History\",\r\n TemplateType = BuiltInListTemplateTypeId.WorkflowHistory,\r\n Url = \"m2WorkflowEnabledListHistory\"\r\n };\r\n\r\n var workflowEnabledList = new ListDefinition\r\n {\r\n Title = \"Workflow Enabled List\",\r\n Description = \"Workflow enabled list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"WorkflowEnabledList\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddSP2013Workflow(writeToHistoryListWorkflow)\r\n .AddList(historyList)\r\n .AddList(taskList)\r\n .AddList(workflowEnabledList, list =>\r\n {\r\n list\r\n .AddSP2013WorkflowSubscription(new SP2013WorkflowSubscriptionDefinition\r\n {\r\n Name = \"Write To History List Workflow\",\r\n WorkflowDisplayName = writeToHistoryListWorkflow.DisplayName,\r\n HistoryListUrl = historyList.GetListUrl(),\r\n TaskListUrl = taskList.GetListUrl()\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n SP2013WorkflowSubscriptionDefinitionTests\r\n SP2013WorkflowSubscriptionDefinitionTestsClass\r\n \r\n ClassSP2013WorkflowSubscriptionDefinitionTestsClass\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.SP2013WorkflowSubscriptionDefinitionTests\r\n 0\r\n SP2013WorkflowSubscriptionDefinitionTests.cs\r\n SP2013WorkflowSubscriptionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SP2013WorkflowSubscriptionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n TargetApplicationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TargetApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TargetApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Target Application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TargetApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TargetApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Target Application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TargetApplicationDefinitionTests\r\n TargetApplicationDefinitionTestsClass\r\n \r\n ClassTargetApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests\r\n 0\r\n TargetApplicationDefinitionTests.cs\r\n TargetApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TargetApplicationDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n TextFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TextFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TextFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add text field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TextFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TextFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add text field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TextFieldDefinitionTests\r\n TextFieldDefinitionTestsClass\r\n \r\n ClassTextFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests\r\n 0\r\n TextFieldDefinitionTests.cs\r\n TextFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TextFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n Navigation\r\n \r\n \r\n \r\n TopNavigationNodeDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TopNavigationNodeDefinitionTests : ProvisionTestBase\r\n {\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add hierarchical top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TopNavigationNodeDefinitionTests : ProvisionTestBase\r\n{\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add hierarchical top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n TopNavigationNodeDefinitionTestsClass\r\n \r\n ClassTopNavigationNodeDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n TreeViewSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TreeViewSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TreeViewSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add tree view settings to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TreeViewSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TreeViewSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add tree view settings to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TreeViewSettingsDefinitionTests\r\n TreeViewSettingsDefinitionTestsClass\r\n \r\n ClassTreeViewSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests\r\n 0\r\n TreeViewSettingsDefinitionTests.cs\r\n TreeViewSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TreeViewSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UniqueContentTypeFieldsOrderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeFieldsOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UniqueContentTypeFieldsOrderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeFieldsOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n UniqueContentTypeFieldsOrderDefinitionTestsClass\r\n \r\n ClassUniqueContentTypeFieldsOrderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests\r\n 0\r\n UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n UniqueContentTypeOrderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UniqueContentTypeOrderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UniqueContentTypeOrderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeOrderDefinitionTests\r\n UniqueContentTypeOrderDefinitionTestsClass\r\n \r\n ClassUniqueContentTypeOrderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests\r\n 0\r\n UniqueContentTypeOrderDefinitionTests.cs\r\n UniqueContentTypeOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeOrderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n URLFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class URLFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.URLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add URL field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class URLFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.URLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add URL field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n URLFieldDefinitionTests\r\n URLFieldDefinitionTestsClass\r\n \r\n ClassURLFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests\r\n 0\r\n URLFieldDefinitionTests.cs\r\n URLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\URLFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n User custom action\r\n \r\n \r\n \r\n UserCustomActionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UserCustomActionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action with jQuery\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add custom action to list\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UserCustomActionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action with jQuery\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add custom action to list\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n UserCustomActionDefinitionTestsClass\r\n \r\n ClassUserCustomActionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n TargetApplicationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TargetApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TargetApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Target Application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TargetApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TargetApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Target Application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TargetApplicationDefinitionTests\r\n TargetApplicationDefinitionTestsClass\r\n \r\n ClassTargetApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests\r\n 0\r\n TargetApplicationDefinitionTests.cs\r\n TargetApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TargetApplicationDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n TextFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TextFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TextFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add text field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TextFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TextFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add text field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TextFieldDefinitionTests\r\n TextFieldDefinitionTestsClass\r\n \r\n ClassTextFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests\r\n 0\r\n TextFieldDefinitionTests.cs\r\n TextFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TextFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n Navigation\r\n \r\n \r\n \r\n TopNavigationNodeDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TopNavigationNodeDefinitionTests : ProvisionTestBase\r\n {\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add hierarchical top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TopNavigationNodeDefinitionTests : ProvisionTestBase\r\n{\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add hierarchical top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n TopNavigationNodeDefinitionTestsClass\r\n \r\n ClassTopNavigationNodeDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n TreeViewSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TreeViewSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TreeViewSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add tree view settings to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TreeViewSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TreeViewSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add tree view settings to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TreeViewSettingsDefinitionTests\r\n TreeViewSettingsDefinitionTestsClass\r\n \r\n ClassTreeViewSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests\r\n 0\r\n TreeViewSettingsDefinitionTests.cs\r\n TreeViewSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TreeViewSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UniqueContentTypeFieldsOrderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeFieldsOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UniqueContentTypeFieldsOrderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeFieldsOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n UniqueContentTypeFieldsOrderDefinitionTestsClass\r\n \r\n ClassUniqueContentTypeFieldsOrderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests\r\n 0\r\n UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n UniqueContentTypeOrderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UniqueContentTypeOrderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UniqueContentTypeOrderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeOrderDefinitionTests\r\n UniqueContentTypeOrderDefinitionTestsClass\r\n \r\n ClassUniqueContentTypeOrderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests\r\n 0\r\n UniqueContentTypeOrderDefinitionTests.cs\r\n UniqueContentTypeOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeOrderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n URLFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class URLFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.URLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add URL field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class URLFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.URLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add URL field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n URLFieldDefinitionTests\r\n URLFieldDefinitionTestsClass\r\n \r\n ClassURLFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests\r\n 0\r\n URLFieldDefinitionTests.cs\r\n URLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\URLFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n User custom action\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n UserCustomActionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UserCustomActionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action with jQuery\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add custom action to list\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UserCustomActionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action with jQuery\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add custom action to list\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n UserCustomActionDefinitionTestsClass\r\n \r\n ClassUserCustomActionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n UserFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UserFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add user field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleUserFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UserFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add user field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleUserFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserFieldDefinitionTests\r\n UserFieldDefinitionTestsClass\r\n \r\n ClassUserFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserFieldDefinitionTests\r\n 0\r\n UserFieldDefinitionTests.cs\r\n UserFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n WebApplicationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebApplicationDefinitionTests\r\n WebApplicationDefinitionTestsClass\r\n \r\n ClassWebApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests\r\n 0\r\n WebApplicationDefinitionTests.cs\r\n WebApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebApplicationDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n WebConfigModificationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n public class WebConfigModificationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebConfigModificationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web.config modification\",\r\n Description = \"\"\r\n )]\r\n \r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n public class WebConfigModificationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebConfigModificationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web.config modification\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebConfigModificationDefinitionTests\r\n WebConfigModificationDefinitionTestsClass\r\n \r\n ClassWebConfigModificationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests\r\n 0\r\n WebConfigModificationDefinitionTests.cs\r\n WebConfigModificationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebConfigModificationDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n WebApplicationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebApplicationDefinitionTests\r\n WebApplicationDefinitionTestsClass\r\n \r\n ClassWebApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests\r\n 0\r\n WebApplicationDefinitionTests.cs\r\n WebApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebApplicationDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n WebConfigModificationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n public class WebConfigModificationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebConfigModificationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web.config modification\",\r\n Description = \"\"\r\n )]\r\n \r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n public class WebConfigModificationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebConfigModificationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web.config modification\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebConfigModificationDefinitionTests\r\n WebConfigModificationDefinitionTestsClass\r\n \r\n ClassWebConfigModificationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests\r\n 0\r\n WebConfigModificationDefinitionTests.cs\r\n WebConfigModificationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebConfigModificationDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n WebDefinitionTest\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebDefinitionTest : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWeb()\r\n {\r\n var newCustomerWeb = new WebDefinition\r\n {\r\n Title = \"New customer site\",\r\n Description = \"A dedicated site for the customer support.\",\r\n Url = \"new-customer-web\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n var newPublishingWeb = new WebDefinition\r\n {\r\n Title = \"Temporary Publishing Web\",\r\n Description = \"A temporary punlishing web.\",\r\n Url = \"new-publishing-web\",\r\n WebTemplate = BuiltInWebTemplates.Publishing.PublishingPortal\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(newCustomerWeb);\r\n web.AddWeb(newPublishingWeb);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebDefinition\")]\r\n [SampleMetadata(Title = \"Add multiple webs\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebs()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(DocWebs.News);\r\n web.AddWeb(DocWebs.AboutOurCompany);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add hierarchical webs\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployHierarchicalWebs()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.News)\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddWeb(DocWebs.DepartmentWebs.HR)\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDesk, itWeb =>\r\n {\r\n itWeb\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDeskWebs.Apple)\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDeskWebs.Cisco)\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDeskWebs.Microsoft);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.Sales);\r\n })\r\n .AddWeb(DocWebs.AboutOurCompany);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebDefinitionTest : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWeb()\r\n {\r\n var newCustomerWeb = new WebDefinition\r\n {\r\n Title = \"New customer site\",\r\n Description = \"A dedicated site for the customer support.\",\r\n Url = \"new-customer-web\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n var newPublishingWeb = new WebDefinition\r\n {\r\n Title = \"Temporary Publishing Web\",\r\n Description = \"A temporary punlishing web.\",\r\n Url = \"new-publishing-web\",\r\n WebTemplate = BuiltInWebTemplates.Publishing.PublishingPortal\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(newCustomerWeb);\r\n web.AddWeb(newPublishingWeb);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebDefinition\")]\r\n [SampleMetadata(Title = \"Add multiple webs\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebs()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(DocWebs.News);\r\n web.AddWeb(DocWebs.AboutOurCompany);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add hierarchical webs\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployHierarchicalWebs()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.News)\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddWeb(DocWebs.DepartmentWebs.HR)\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDesk, itWeb =>\r\n {\r\n itWeb\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDeskWebs.Apple)\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDeskWebs.Cisco)\r\n .AddWeb(DocWebs.DepartmentWebs.ITHelpDeskWebs.Microsoft);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.Sales);\r\n })\r\n .AddWeb(DocWebs.AboutOurCompany);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebDefinitionTest\r\n WebDefinitionTestClass\r\n \r\n ClassWebDefinitionTestClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebDefinitionTest\r\n 0\r\n WebDefinitionTests.cs\r\n WebDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n WebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part by type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part by XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part from Gallery File\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part with pre-configured XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part by type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part by XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part from Gallery File\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part with pre-configured XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n WebPartDefinitionTestsClass\r\n \r\n ClassWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n Web part pages\r\n \r\n \r\n \r\n WebPartPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebPartPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part page to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebPartPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part page to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n WebPartPageDefinitionTestsClass\r\n \r\n ClassWebPartPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n Welcome page\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n WelcomePageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WelcomePageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n [SampleMetadata(Title = \"Add list welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WelcomePageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n [SampleMetadata(Title = \"Add list welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n WelcomePageDefinitionTestsClass\r\n \r\n ClassWelcomePageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n Wiki pages\r\n \r\n \r\n \r\n WikiPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WikiPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WikiPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n WikiPageDefinitionTestsClass\r\n \r\n ClassWikiPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n XsltListViewWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class XsltListViewWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class XsltListViewWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n XsltListViewWebPartDefinitionTestsClass\r\n \r\n ClassXsltListViewWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n AudienceDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class AudienceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AudienceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audience\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AudienceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AudienceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audience\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AudienceDefinitionTests\r\n AudienceDefinitionTestsClass\r\n \r\n ClassAudienceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests\r\n 0\r\n AudienceDefinitionTests.cs\r\n AudienceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\AudienceDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ContactFieldControlDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContactFieldControlDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContactFieldControlDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add contact field web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContactFieldControlDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContactFieldControlDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add contact field web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContactFieldControlDefinitionTests\r\n ContactFieldControlDefinitionTestsClass\r\n \r\n ClassContactFieldControlDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests\r\n 0\r\n ContactFieldControlDefinitionTests.cs\r\n ContactFieldControlDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContactFieldControlDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n ContentByQueryWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentByQueryWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentByQueryWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CQWP web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentByQueryWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentByQueryWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CQWP web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentByQueryWebPartDefinitionTests\r\n ContentByQueryWebPartDefinitionTestsClass\r\n \r\n ClassContentByQueryWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests\r\n 0\r\n ContentByQueryWebPartDefinitionTests.cs\r\n ContentByQueryWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContentByQueryWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n WebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part by type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part by XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part from Gallery File\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part with pre-configured XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part by type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part by XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part from Gallery File\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part with pre-configured XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n WebPartDefinitionTestsClass\r\n \r\n ClassWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n Web part pages\r\n \r\n \r\n \r\n WebPartPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebPartPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part page to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebPartPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part page to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n WebPartPageDefinitionTestsClass\r\n \r\n ClassWebPartPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n Welcome page\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n WelcomePageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WelcomePageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n [SampleMetadata(Title = \"Add list welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WelcomePageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n [SampleMetadata(Title = \"Add list welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n WelcomePageDefinitionTestsClass\r\n \r\n ClassWelcomePageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n Wiki pages\r\n \r\n \r\n \r\n WikiPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WikiPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WikiPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n WikiPageDefinitionTestsClass\r\n \r\n ClassWikiPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n XsltListViewWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class XsltListViewWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class XsltListViewWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n XsltListViewWebPartDefinitionTestsClass\r\n \r\n ClassXsltListViewWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n AudienceDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class AudienceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AudienceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audience\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AudienceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AudienceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audience\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AudienceDefinitionTests\r\n AudienceDefinitionTestsClass\r\n \r\n ClassAudienceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests\r\n 0\r\n AudienceDefinitionTests.cs\r\n AudienceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\AudienceDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ContactFieldControlDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContactFieldControlDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContactFieldControlDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add contact field web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContactFieldControlDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContactFieldControlDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add contact field web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContactFieldControlDefinitionTests\r\n ContactFieldControlDefinitionTestsClass\r\n \r\n ClassContactFieldControlDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests\r\n 0\r\n ContactFieldControlDefinitionTests.cs\r\n ContactFieldControlDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContactFieldControlDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ContentByQueryWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentByQueryWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentByQueryWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CQWP web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentByQueryWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentByQueryWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CQWP web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentByQueryWebPartDefinitionTests\r\n ContentByQueryWebPartDefinitionTestsClass\r\n \r\n ClassContentByQueryWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests\r\n 0\r\n ContentByQueryWebPartDefinitionTests.cs\r\n ContentByQueryWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContentByQueryWebPartDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n Display Templates\r\n \r\n \r\n \r\n ControlDisplayTemplateDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ControlDisplayTemplateDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ControlDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add control display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleControlDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ControlDisplayTemplateDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ControlDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add control display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleControlDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ControlDisplayTemplateDefinitionTests\r\n ControlDisplayTemplateDefinitionTestsClass\r\n \r\n ClassControlDisplayTemplateDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ControlDisplayTemplateDefinitionTests\r\n 0\r\n ControlDisplayTemplateDefinitionTests.cs\r\n ControlDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ControlDisplayTemplateDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n CustomDocumentIdProviderDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CustomDocumentIdProviderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CustomDocumentIdProviderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Document ID provider\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CustomDocumentIdProviderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CustomDocumentIdProviderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Document ID provider\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CustomDocumentIdProviderDefinitionTests\r\n CustomDocumentIdProviderDefinitionTestsClass\r\n \r\n ClassCustomDocumentIdProviderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests\r\n 0\r\n CustomDocumentIdProviderDefinitionTests.cs\r\n CustomDocumentIdProviderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\CustomDocumentIdProviderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n HTMLFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class HTMLFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HTMLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add HTML field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class HTMLFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HTMLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add HTML field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HTMLFieldDefinitionTests\r\n HTMLFieldDefinitionTestsClass\r\n \r\n ClassHTMLFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests\r\n 0\r\n HTMLFieldDefinitionTests.cs\r\n HTMLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\HTMLFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n ImageFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ImageFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ImageFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageFieldDefinitionTests\r\n ImageFieldDefinitionTestsClass\r\n \r\n ClassImageFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests\r\n 0\r\n ImageFieldDefinitionTests.cs\r\n ImageFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n ImageRenditionDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ImageRenditionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageRenditionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image rendition\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ImageRenditionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageRenditionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image rendition\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageRenditionDefinitionTests\r\n ImageRenditionDefinitionTestsClass\r\n \r\n ClassImageRenditionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests\r\n 0\r\n ImageRenditionDefinitionTests.cs\r\n ImageRenditionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageRenditionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n Display Templates\r\n \r\n \r\n \r\n ItemDisplayTemplateDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ItemDisplayTemplateDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ItemDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ItemDisplayTemplateDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ItemDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ItemDisplayTemplateDefinitionTests\r\n ItemDisplayTemplateDefinitionTestsClass\r\n \r\n ClassItemDisplayTemplateDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests\r\n 0\r\n ItemDisplayTemplateDefinitionTests.cs\r\n ItemDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ItemDisplayTemplateDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n JavaScriptDisplayTemplateDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class JavaScriptDisplayTemplateDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JavaScriptDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add JavaScript display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class JavaScriptDisplayTemplateDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JavaScriptDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add JavaScript display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JavaScriptDisplayTemplateDefinitionTests\r\n JavaScriptDisplayTemplateDefinitionTestsClass\r\n \r\n ClassJavaScriptDisplayTemplateDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests\r\n 0\r\n JavaScriptDisplayTemplateDefinitionTests.cs\r\n JavaScriptDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\JavaScriptDisplayTemplateDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n LinkFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class LinkFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class LinkFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n LinkFieldDefinitionTests\r\n LinkFieldDefinitionTestsClass\r\n \r\n ClassLinkFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests\r\n 0\r\n LinkFieldDefinitionTests.cs\r\n LinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\LinkFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n MediaFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class MediaFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MediaFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add media field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class MediaFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MediaFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add media field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MediaFieldDefinitionTests\r\n MediaFieldDefinitionTestsClass\r\n \r\n ClassMediaFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests\r\n 0\r\n MediaFieldDefinitionTests.cs\r\n MediaFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\MediaFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PageLayoutAndSiteTemplateSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PageLayoutAndSiteTemplateSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add page layout and site template settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PageLayoutAndSiteTemplateSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PageLayoutAndSiteTemplateSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add page layout and site template settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n PageLayoutAndSiteTemplateSettingsDefinitionTestsClass\r\n \r\n ClassPageLayoutAndSiteTemplateSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n 0\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n Publishing pages\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n PublishingPageDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PublishingPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages with custom layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PublishingPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages with custom layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n PublishingPageDefinitionTestsClass\r\n \r\n ClassPublishingPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n Master page gallery\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n PublishingPageLayoutDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PublishingPageLayoutDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing page layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PublishingPageLayoutDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing page layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageLayoutDefinitionTests\r\n PublishingPageLayoutDefinitionTestsClass\r\n \r\n ClassPublishingPageLayoutDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests\r\n 0\r\n PublishingPageLayoutDefinitionTests.cs\r\n PublishingPageLayoutDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageLayoutDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n CustomDocumentIdProviderDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CustomDocumentIdProviderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CustomDocumentIdProviderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Document ID provider\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CustomDocumentIdProviderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CustomDocumentIdProviderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Document ID provider\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CustomDocumentIdProviderDefinitionTests\r\n CustomDocumentIdProviderDefinitionTestsClass\r\n \r\n ClassCustomDocumentIdProviderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests\r\n 0\r\n CustomDocumentIdProviderDefinitionTests.cs\r\n CustomDocumentIdProviderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\CustomDocumentIdProviderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n HTMLFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class HTMLFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HTMLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add HTML field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class HTMLFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HTMLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add HTML field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HTMLFieldDefinitionTests\r\n HTMLFieldDefinitionTestsClass\r\n \r\n ClassHTMLFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests\r\n 0\r\n HTMLFieldDefinitionTests.cs\r\n HTMLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\HTMLFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n ImageFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ImageFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ImageFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageFieldDefinitionTests\r\n ImageFieldDefinitionTestsClass\r\n \r\n ClassImageFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests\r\n 0\r\n ImageFieldDefinitionTests.cs\r\n ImageFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n ImageRenditionDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ImageRenditionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageRenditionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image rendition\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ImageRenditionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageRenditionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image rendition\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageRenditionDefinitionTests\r\n ImageRenditionDefinitionTestsClass\r\n \r\n ClassImageRenditionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests\r\n 0\r\n ImageRenditionDefinitionTests.cs\r\n ImageRenditionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageRenditionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ItemDisplayTemplateDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ItemDisplayTemplateDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ItemDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ItemDisplayTemplateDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ItemDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ItemDisplayTemplateDefinitionTests\r\n ItemDisplayTemplateDefinitionTestsClass\r\n \r\n ClassItemDisplayTemplateDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests\r\n 0\r\n ItemDisplayTemplateDefinitionTests.cs\r\n ItemDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ItemDisplayTemplateDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n JavaScriptDisplayTemplateDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class JavaScriptDisplayTemplateDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JavaScriptDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add JavaScript display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class JavaScriptDisplayTemplateDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JavaScriptDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add JavaScript display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JavaScriptDisplayTemplateDefinitionTests\r\n JavaScriptDisplayTemplateDefinitionTestsClass\r\n \r\n ClassJavaScriptDisplayTemplateDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests\r\n 0\r\n JavaScriptDisplayTemplateDefinitionTests.cs\r\n JavaScriptDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\JavaScriptDisplayTemplateDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n LinkFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class LinkFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class LinkFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n LinkFieldDefinitionTests\r\n LinkFieldDefinitionTestsClass\r\n \r\n ClassLinkFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests\r\n 0\r\n LinkFieldDefinitionTests.cs\r\n LinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\LinkFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n MediaFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class MediaFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MediaFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add media field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class MediaFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MediaFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add media field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MediaFieldDefinitionTests\r\n MediaFieldDefinitionTestsClass\r\n \r\n ClassMediaFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests\r\n 0\r\n MediaFieldDefinitionTests.cs\r\n MediaFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\MediaFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PageLayoutAndSiteTemplateSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PageLayoutAndSiteTemplateSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Setup default web templates\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var sitePublishingInfrastructureFeature = BuiltInSiteFeatures.SharePointServerPublishingInfrastructure.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var webPublishingInfrastructureFeature = BuiltInWebFeatures.SharePointServerPublishing.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var settings = new PageLayoutAndSiteTemplateSettingsDefinition\r\n {\r\n // setup web templates\r\n UseDefinedWebTemplates = true,\r\n DefinedWebTemplates = new Collection<string>\r\n {\r\n BuiltInWebTemplates.Collaboration.BlankSite,\r\n BuiltInWebTemplates.Collaboration.Blog,\r\n BuiltInWebTemplates.Collaboration.TeamSite\r\n },\r\n\r\n // setup page layouts\r\n UseDefinedPageLayouts = true,\r\n DefinedPageLayouts = new Collection<string>\r\n {\r\n BuiltInPublishingPageLayoutNames.ArticleLeft,\r\n BuiltInPublishingPageLayoutNames.ArticleRight,\r\n BuiltInPublishingPageLayoutNames.ArticleLinks\r\n },\r\n\r\n // setup default page layout\r\n UseDefinedDefaultPageLayout = true,\r\n DefinedDefaultPageLayout = BuiltInPublishingPageLayoutNames.ArticleRight,\r\n };\r\n\r\n // create site model to enable publishing infrastructure\r\n // then deploy web model with page layout settings\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSiteFeature(sitePublishingInfrastructureFeature);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWebFeature(webPublishingInfrastructureFeature);\r\n web.AddPageLayoutAndSiteTemplateSettings(settings);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PageLayoutAndSiteTemplateSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PageLayoutAndSiteTemplateSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Setup default web templates\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var sitePublishingInfrastructureFeature = BuiltInSiteFeatures.SharePointServerPublishingInfrastructure.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var webPublishingInfrastructureFeature = BuiltInWebFeatures.SharePointServerPublishing.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var settings = new PageLayoutAndSiteTemplateSettingsDefinition\r\n {\r\n // setup web templates\r\n UseDefinedWebTemplates = true,\r\n DefinedWebTemplates = new Collection<string>\r\n {\r\n BuiltInWebTemplates.Collaboration.BlankSite,\r\n BuiltInWebTemplates.Collaboration.Blog,\r\n BuiltInWebTemplates.Collaboration.TeamSite\r\n },\r\n\r\n // setup page layouts\r\n UseDefinedPageLayouts = true,\r\n DefinedPageLayouts = new Collection<string>\r\n {\r\n BuiltInPublishingPageLayoutNames.ArticleLeft,\r\n BuiltInPublishingPageLayoutNames.ArticleRight,\r\n BuiltInPublishingPageLayoutNames.ArticleLinks\r\n },\r\n\r\n // setup default page layout\r\n UseDefinedDefaultPageLayout = true,\r\n DefinedDefaultPageLayout = BuiltInPublishingPageLayoutNames.ArticleRight,\r\n };\r\n\r\n // create site model to enable publishing infrastructure\r\n // then deploy web model with page layout settings\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSiteFeature(sitePublishingInfrastructureFeature);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWebFeature(webPublishingInfrastructureFeature);\r\n web.AddPageLayoutAndSiteTemplateSettings(settings);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n PageLayoutAndSiteTemplateSettingsDefinitionTestsClass\r\n \r\n ClassPageLayoutAndSiteTemplateSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n 0\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n Publishing pages\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n PublishingPageDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PublishingPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages with custom layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PublishingPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages with custom layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n PublishingPageDefinitionTestsClass\r\n \r\n ClassPublishingPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n Master page gallery\r\n \r\n \r\n \r\n PublishingPageLayoutDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PublishingPageLayoutDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing page layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PublishingPageLayoutDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing page layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageLayoutDefinitionTests\r\n PublishingPageLayoutDefinitionTestsClass\r\n \r\n ClassPublishingPageLayoutDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests\r\n 0\r\n PublishingPageLayoutDefinitionTests.cs\r\n PublishingPageLayoutDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageLayoutDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n SearchConfigurationDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SearchConfigurationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchConfigurationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search configuration\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchConfigurationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SearchConfigurationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchConfigurationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search configuration\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchConfigurationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchConfigurationDefinitionTests\r\n SearchConfigurationDefinitionTestsClass\r\n \r\n ClassSearchConfigurationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchConfigurationDefinitionTests\r\n 0\r\n SearchConfigurationDefinitionTests.cs\r\n SearchConfigurationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchConfigurationDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SearchResultDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SearchResultDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchResultDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search result\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SearchResultDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchResultDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search result\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchResultDefinitionTests\r\n SearchResultDefinitionTestsClass\r\n \r\n ClassSearchResultDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests\r\n 0\r\n SearchResultDefinitionTests.cs\r\n SearchResultDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchResultDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SearchSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SearchSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SearchSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchSettingsDefinitionTests\r\n SearchSettingsDefinitionTestsClass\r\n \r\n ClassSearchSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests\r\n 0\r\n SearchSettingsDefinitionTests.cs\r\n SearchSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n SiteFeedWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SiteFeedWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteFeedWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Site Feed web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SiteFeedWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteFeedWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Site Feed web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteFeedWebPartDefinitionTests\r\n SiteFeedWebPartDefinitionTestsClass\r\n \r\n ClassSiteFeedWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests\r\n 0\r\n SiteFeedWebPartDefinitionTests.cs\r\n SiteFeedWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SiteFeedWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SummaryLinkFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SummaryLinkFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add summary link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SummaryLinkFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add summary link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkFieldDefinitionTests\r\n SummaryLinkFieldDefinitionTestsClass\r\n \r\n ClassSummaryLinkFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests\r\n 0\r\n SummaryLinkFieldDefinitionTests.cs\r\n SummaryLinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n SummaryLinkWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SummaryLinkWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Summary Links web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SummaryLinkWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Summary Links web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkWebPartDefinitionTests\r\n SummaryLinkWebPartDefinitionTestsClass\r\n \r\n ClassSummaryLinkWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests\r\n 0\r\n SummaryLinkWebPartDefinitionTests.cs\r\n SummaryLinkWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n TaxonomyFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n \r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyFieldDefinitionTests\r\n TaxonomyFieldDefinitionTestsClass\r\n \r\n ClassTaxonomyFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests\r\n 0\r\n TaxonomyFieldDefinitionTests.cs\r\n TaxonomyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n TaxonomyTermDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy terms\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model \r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy terms\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermDefinitionTests\r\n TaxonomyTermDefinitionTestsClass\r\n \r\n ClassTaxonomyTermDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests\r\n 0\r\n TaxonomyTermDefinitionTests.cs\r\n TaxonomyTermDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n TaxonomyTermGroupDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermGroupDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy term group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermGroupDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy term group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n TaxonomyTermGroupDefinitionTestsClass\r\n \r\n ClassTaxonomyTermGroupDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n TaxonomyTermLabelDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermLabelDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermLabelDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term label\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermLabelDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermLabelDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term label\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermLabelDefinitionTests\r\n TaxonomyTermLabelDefinitionTestsClass\r\n \r\n ClassTaxonomyTermLabelDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests\r\n 0\r\n TaxonomyTermLabelDefinitionTests.cs\r\n TaxonomyTermLabelDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermLabelDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n TaxonomyTermSetDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermSetDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermSetDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy termsets\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermSetDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermSetDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy termsets\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermSetDefinitionTests\r\n TaxonomyTermSetDefinitionTestsClass\r\n \r\n ClassTaxonomyTermSetDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests\r\n 0\r\n TaxonomyTermSetDefinitionTests.cs\r\n TaxonomyTermSetDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermSetDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n TaxonomyTermStoreDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermStoreDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term store by Name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add default taxonomy term store\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermStoreDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term store by Name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add default taxonomy term store\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n TaxonomyTermStoreDefinitionTestsClass\r\n \r\n ClassTaxonomyTermStoreDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SearchResultDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SearchResultDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchResultDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search result\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SearchResultDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchResultDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search result\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchResultDefinitionTests\r\n SearchResultDefinitionTestsClass\r\n \r\n ClassSearchResultDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests\r\n 0\r\n SearchResultDefinitionTests.cs\r\n SearchResultDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchResultDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n SearchSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SearchSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SearchSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchSettingsDefinitionTests\r\n SearchSettingsDefinitionTestsClass\r\n \r\n ClassSearchSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests\r\n 0\r\n SearchSettingsDefinitionTests.cs\r\n SearchSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n SiteFeedWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SiteFeedWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteFeedWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Site Feed web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SiteFeedWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteFeedWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Site Feed web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteFeedWebPartDefinitionTests\r\n SiteFeedWebPartDefinitionTestsClass\r\n \r\n ClassSiteFeedWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests\r\n 0\r\n SiteFeedWebPartDefinitionTests.cs\r\n SiteFeedWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SiteFeedWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SummaryLinkFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SummaryLinkFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add summary link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SummaryLinkFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add summary link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkFieldDefinitionTests\r\n SummaryLinkFieldDefinitionTestsClass\r\n \r\n ClassSummaryLinkFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests\r\n 0\r\n SummaryLinkFieldDefinitionTests.cs\r\n SummaryLinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SummaryLinkWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SummaryLinkWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Summary Links web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SummaryLinkWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Summary Links web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkWebPartDefinitionTests\r\n SummaryLinkWebPartDefinitionTestsClass\r\n \r\n ClassSummaryLinkWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests\r\n 0\r\n SummaryLinkWebPartDefinitionTests.cs\r\n SummaryLinkWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n TaxonomyFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n \r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyFieldDefinitionTests\r\n TaxonomyFieldDefinitionTestsClass\r\n \r\n ClassTaxonomyFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests\r\n 0\r\n TaxonomyFieldDefinitionTests.cs\r\n TaxonomyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n TaxonomyTermDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy terms\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model \r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy terms\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermDefinitionTests\r\n TaxonomyTermDefinitionTestsClass\r\n \r\n ClassTaxonomyTermDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests\r\n 0\r\n TaxonomyTermDefinitionTests.cs\r\n TaxonomyTermDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n TaxonomyTermGroupDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermGroupDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy term group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermGroupDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy term group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n TaxonomyTermGroupDefinitionTestsClass\r\n \r\n ClassTaxonomyTermGroupDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n TaxonomyTermLabelDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermLabelDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermLabelDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term label\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermLabelDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermLabelDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term label\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermLabelDefinitionTests\r\n TaxonomyTermLabelDefinitionTestsClass\r\n \r\n ClassTaxonomyTermLabelDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests\r\n 0\r\n TaxonomyTermLabelDefinitionTests.cs\r\n TaxonomyTermLabelDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermLabelDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n TaxonomyTermSetDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermSetDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermSetDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy termsets\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermSetDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermSetDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy termsets\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermSetDefinitionTests\r\n TaxonomyTermSetDefinitionTestsClass\r\n \r\n ClassTaxonomyTermSetDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests\r\n 0\r\n TaxonomyTermSetDefinitionTests.cs\r\n TaxonomyTermSetDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermSetDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n TaxonomyTermStoreDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermStoreDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term store by Name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add default taxonomy term store\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermStoreDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term store by Name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add default taxonomy term store\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n TaxonomyTermStoreDefinitionTestsClass\r\n \r\n ClassTaxonomyTermStoreDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n") , SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n WebNavigationSettingsDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebNavigationSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebNavigationSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web navigation settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebNavigationSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebNavigationSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebNavigationSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web navigation settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebNavigationSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebNavigationSettingsDefinitionTests\r\n WebNavigationSettingsDefinitionTestsClass\r\n \r\n ClassWebNavigationSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebNavigationSettingsDefinitionTests\r\n 0\r\n WebNavigationSettingsDefinitionTests.cs\r\n WebNavigationSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\WebNavigationSettingsDefinitionTests.cs\r\n") }); public static class RegressionTestingBase @@ -500,6 +510,30 @@ public static class Models public static SubPointSolutions.Docs.Code.Data.DocSample ModelsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n Models\r\n \r\n \r\n public class Models : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Models\")]\r\n public void SettingUpSiteModels()\r\n {\r\n // step 1, setup your definition\r\n\r\n // step 2, setup your site models\r\n var taxonomyModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup site taxonomy\r\n });\r\n\r\n var featuresAndSandboxSolutionsModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup sandbox solutions and features\r\n });\r\n\r\n var fieldsAndContentTypesModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup fields and content types\r\n });\r\n\r\n // step 3, deploy site models\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Models\")]\r\n public void SettingUpWebModels()\r\n {\r\n // step 1, setup your definition\r\n\r\n // step 2, setup your site models\r\n var featuresModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup features\r\n });\r\n\r\n var listsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup fields and content types\r\n });\r\n\r\n var navigationModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup web navigation\r\n });\r\n\r\n // step 3, deploy web models\r\n }\r\n\r\n #endregion\r\n }\r\n public class Models : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Models\")]\r\n public void SettingUpSiteModels()\r\n {\r\n // step 1, setup your definition\r\n\r\n // step 2, setup your site models\r\n var taxonomyModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup site taxonomy\r\n });\r\n\r\n var featuresAndSandboxSolutionsModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup sandbox solutions and features\r\n });\r\n\r\n var fieldsAndContentTypesModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n // setup fields and content types\r\n });\r\n\r\n // step 3, deploy site models\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.Models\")]\r\n public void SettingUpWebModels()\r\n {\r\n // step 1, setup your definition\r\n\r\n // step 2, setup your site models\r\n var featuresModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup features\r\n });\r\n\r\n var listsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup fields and content types\r\n });\r\n\r\n var navigationModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // setup web navigation\r\n });\r\n\r\n // step 3, deploy web models\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n Models\r\n ModelsClass\r\n \r\n ClassModelsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.Models\r\n 0\r\n Models.cs\r\n Models\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\Models.cs\r\n"); } + public static class ProvisionServices + { + public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_SiteModel_CSOM\r\n \r\n \r\n \r\n public void Deploy_SiteModel_CSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(clientContext, siteModel);\r\n\r\n // deploy site model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(clientContext, siteModel);\r\n }\r\n }\r\n // setup url\r\nvar siteUrl = \"\";\r\n\r\n// create you model\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\n// setup client context\r\nusing (var clientContext = new ClientContext(siteUrl))\r\n{\r\n // deploy site model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(clientContext, siteModel);\r\n\r\n // deploy site model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(clientContext, siteModel);\r\n}\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_SiteModel_CSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_SiteModel_CSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_WebModel_CSOM\r\n \r\n \r\n \r\n public void Deploy_WebModel_CSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(webUrl))\r\n {\r\n // deploy web model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(clientContext, webModel);\r\n\r\n // deploy web model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeployWebModel(clientContext, webModel);\r\n }\r\n }\r\n // setup url\r\nvar webUrl = \"\";\r\n\r\n// create you model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n});\r\n\r\n// setup client context\r\nusing (var clientContext = new ClientContext(webUrl))\r\n{\r\n // deploy web model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(clientContext, webModel);\r\n\r\n // deploy web model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeployWebModel(clientContext, webModel);\r\n}\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_WebModel_CSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_WebModel_CSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_FarmModel_SSOM\r\n \r\n \r\n \r\n public void Deploy_FarmModel_SSOM()\r\n {\r\n // create you model\r\n var farmModel = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n\r\n });\r\n\r\n var spFarm = SPFarm.Local;\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployFarmModel(spFarm, farmModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployFarmModel(spFarm, farmModel);\r\n }\r\n // create you model\r\nvar farmModel = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n\r\n});\r\n\r\nvar spFarm = SPFarm.Local;\r\n\r\n// deploy site model with SharePoint Foundation SSOM API\r\nvar foundationProvisionService = new SSOMProvisionService();\r\nfoundationProvisionService.DeployFarmModel(spFarm, farmModel);\r\n\r\n// deploy site model with SharePoint Standard SSOM API\r\nvar standardProvisionService = new StandardSSOMProvisionService();\r\nstandardProvisionService.DeployFarmModel(spFarm, farmModel);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_FarmModel_SSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_FarmModel_SSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_WebApplicationModel_SSOM\r\n \r\n \r\n \r\n public void Deploy_WebApplicationModel_SSOM()\r\n {\r\n // setup url\r\n var webAppUrl = \"\";\r\n\r\n // create you model\r\n var webAppModel = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n\r\n });\r\n\r\n var spWebApp = SPWebApplication.Lookup(new Uri(webAppUrl));\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n }\r\n // setup url\r\nvar webAppUrl = \"\";\r\n\r\n// create you model\r\nvar webAppModel = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n\r\n});\r\n\r\nvar spWebApp = SPWebApplication.Lookup(new Uri(webAppUrl));\r\n\r\n// deploy site model with SharePoint Foundation SSOM API\r\nvar foundationProvisionService = new SSOMProvisionService();\r\nfoundationProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n\r\n// deploy site model with SharePoint Standard SSOM API\r\nvar standardProvisionService = new StandardSSOMProvisionService();\r\nstandardProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_WebApplicationModel_SSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_WebApplicationModel_SSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_SiteModel_SSOM\r\n \r\n \r\n \r\n public void Deploy_SiteModel_SSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(spSite, siteModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(spSite, siteModel);\r\n }\r\n }\r\n // setup url\r\nvar siteUrl = \"\";\r\n\r\n// create you model\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nusing (var spSite = new SPSite(siteUrl))\r\n{\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(spSite, siteModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(spSite, siteModel);\r\n}\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_SiteModel_SSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_SiteModel_SSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_WebModel_SSOM\r\n \r\n \r\n \r\n public void Deploy_WebModel_SSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(spWeb, webModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebModel(spWeb, webModel);\r\n }\r\n }\r\n }\r\n // setup url\r\nvar webUrl = \"\";\r\n\r\n// create you model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n});\r\n\r\nusing (var spSite = new SPSite(webUrl))\r\n{\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(spWeb, webModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebModel(spWeb, webModel);\r\n }\r\n}\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_WebModel_SSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_WebModel_SSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n <Description />\r\n <MethodBodyWithFunction>public void DeployIncrementally_Default_SSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardSSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(spWeb, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(spWeb, webModel);\r\n }\r\n }\r\n }</MethodBodyWithFunction>\r\n <MethodBody>var webUrl = \"\";\r\n\r\n// create you models\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n});\r\n\r\nusing (var spSite = new SPSite(webUrl))\r\n{\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardSSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(spWeb, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(spWeb, webModel);\r\n }\r\n}\r\n\r\n</MethodBody>\r\n <Language>cs</Language>\r\n <Namespace>SubPointSolutions.Docs.Views.Views.SPMeta2.reference</Namespace>\r\n <ClassName>ProvisionServices</ClassName>\r\n <MethodName>DeployIncrementally_Default_SSOM</MethodName>\r\n <ClassComment />\r\n <MethodFullName>SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.DeployIncrementally_Default_SSOM</MethodFullName>\r\n <ClassFullName>SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices</ClassFullName>\r\n <MethodParametersCount>0</MethodParametersCount>\r\n <SourceFileName>ProvisionServices.cs</SourceFileName>\r\n <SourceFileNameWithoutExtension>ProvisionServices</SourceFileNameWithoutExtension>\r\n <SourceFileFolder>..\\..\\Views\\SPMeta2\\reference</SourceFileFolder>\r\n <SourceFilePath>..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs</SourceFilePath>\r\n</DocSample>") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<DocSample xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n <IsMethod>true</IsMethod>\r\n <IsClass>false</IsClass>\r\n <Tags />\r\n <Title />\r\n <Description />\r\n <MethodBodyWithFunction>public void DeployIncrementally_Default_CSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardCSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(clientContext, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(clientContext, webModel);\r\n }\r\n }</MethodBodyWithFunction>\r\n <MethodBody>var webUrl = \"\";\r\n\r\n// create you models\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n});\r\n\r\n// setup client context\r\nusing (var clientContext = new ClientContext(siteUrl))\r\n{\r\n // deploy site model incrementally\r\n var provisionService = new StandardCSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(clientContext, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(clientContext, webModel);\r\n}\r\n\r\n</MethodBody>\r\n <Language>cs</Language>\r\n <Namespace>SubPointSolutions.Docs.Views.Views.SPMeta2.reference</Namespace>\r\n <ClassName>ProvisionServices</ClassName>\r\n <MethodName>DeployIncrementally_Default_CSOM</MethodName>\r\n <ClassComment />\r\n <MethodFullName>SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.DeployIncrementally_Default_CSOM</MethodFullName>\r\n <ClassFullName>SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices</ClassFullName>\r\n <MethodParametersCount>0</MethodParametersCount>\r\n <SourceFileName>ProvisionServices.cs</SourceFileName>\r\n <SourceFileNameWithoutExtension>ProvisionServices</SourceFileNameWithoutExtension>\r\n <SourceFileFolder>..\\..\\Views\\SPMeta2\\reference</SourceFileFolder>\r\n <SourceFilePath>..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs</SourceFilePath>\r\n</DocSample>") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<DocSample xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n <IsMethod>false</IsMethod>\r\n <IsClass>true</IsClass>\r\n <Tags />\r\n <Title>ProvisionServices\r\n \r\n \r\n public class ProvisionServices : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_SiteModel_CSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(clientContext, siteModel);\r\n\r\n // deploy site model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(clientContext, siteModel);\r\n }\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebModel_CSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(webUrl))\r\n {\r\n // deploy web model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(clientContext, webModel);\r\n\r\n // deploy web model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeployWebModel(clientContext, webModel);\r\n }\r\n }\r\n\r\n #region ssom\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_FarmModel_SSOM()\r\n {\r\n // create you model\r\n var farmModel = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n\r\n });\r\n\r\n var spFarm = SPFarm.Local;\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployFarmModel(spFarm, farmModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployFarmModel(spFarm, farmModel);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebApplicationModel_SSOM()\r\n {\r\n // setup url\r\n var webAppUrl = \"\";\r\n\r\n // create you model\r\n var webAppModel = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n\r\n });\r\n\r\n var spWebApp = SPWebApplication.Lookup(new Uri(webAppUrl));\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_SiteModel_SSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(spSite, siteModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(spSite, siteModel);\r\n }\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebModel_SSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(spWeb, webModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebModel(spWeb, webModel);\r\n }\r\n }\r\n }\r\n\r\n #endregion\r\n\r\n #region incremental\r\n\r\n public void DeployIncrementally_Default_SSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardSSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(spWeb, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(spWeb, webModel);\r\n }\r\n }\r\n }\r\n public void DeployIncrementally_Default_CSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardCSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(clientContext, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(clientContext, webModel);\r\n }\r\n }\r\n\r\n\r\n #endregion\r\n\r\n #endregion\r\n }\r\n public class ProvisionServices : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_SiteModel_CSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(clientContext, siteModel);\r\n\r\n // deploy site model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(clientContext, siteModel);\r\n }\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebModel_CSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(webUrl))\r\n {\r\n // deploy web model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(clientContext, webModel);\r\n\r\n // deploy web model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeployWebModel(clientContext, webModel);\r\n }\r\n }\r\n\r\n #region ssom\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_FarmModel_SSOM()\r\n {\r\n // create you model\r\n var farmModel = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n\r\n });\r\n\r\n var spFarm = SPFarm.Local;\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployFarmModel(spFarm, farmModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployFarmModel(spFarm, farmModel);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebApplicationModel_SSOM()\r\n {\r\n // setup url\r\n var webAppUrl = \"\";\r\n\r\n // create you model\r\n var webAppModel = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n\r\n });\r\n\r\n var spWebApp = SPWebApplication.Lookup(new Uri(webAppUrl));\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_SiteModel_SSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(spSite, siteModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(spSite, siteModel);\r\n }\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebModel_SSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(spWeb, webModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebModel(spWeb, webModel);\r\n }\r\n }\r\n }\r\n\r\n #endregion\r\n\r\n #region incremental\r\n\r\n public void DeployIncrementally_Default_SSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardSSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(spWeb, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(spWeb, webModel);\r\n }\r\n }\r\n }\r\n public void DeployIncrementally_Default_CSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardCSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(clientContext, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(clientContext, webModel);\r\n }\r\n }\r\n\r\n\r\n #endregion\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n ProvisionServicesClass\r\n \r\n ClassProvisionServicesClass\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n") + }); + public static SubPointSolutions.Docs.Code.Data.DocSample Deploy_SiteModel_CSOM = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_SiteModel_CSOM\r\n \r\n \r\n \r\n public void Deploy_SiteModel_CSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(clientContext, siteModel);\r\n\r\n // deploy site model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(clientContext, siteModel);\r\n }\r\n }\r\n // setup url\r\nvar siteUrl = \"\";\r\n\r\n// create you model\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\n// setup client context\r\nusing (var clientContext = new ClientContext(siteUrl))\r\n{\r\n // deploy site model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(clientContext, siteModel);\r\n\r\n // deploy site model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(clientContext, siteModel);\r\n}\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_SiteModel_CSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_SiteModel_CSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample Deploy_WebModel_CSOM = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_WebModel_CSOM\r\n \r\n \r\n \r\n public void Deploy_WebModel_CSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(webUrl))\r\n {\r\n // deploy web model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(clientContext, webModel);\r\n\r\n // deploy web model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeployWebModel(clientContext, webModel);\r\n }\r\n }\r\n // setup url\r\nvar webUrl = \"\";\r\n\r\n// create you model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n});\r\n\r\n// setup client context\r\nusing (var clientContext = new ClientContext(webUrl))\r\n{\r\n // deploy web model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(clientContext, webModel);\r\n\r\n // deploy web model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeployWebModel(clientContext, webModel);\r\n}\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_WebModel_CSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_WebModel_CSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample Deploy_FarmModel_SSOM = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_FarmModel_SSOM\r\n \r\n \r\n \r\n public void Deploy_FarmModel_SSOM()\r\n {\r\n // create you model\r\n var farmModel = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n\r\n });\r\n\r\n var spFarm = SPFarm.Local;\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployFarmModel(spFarm, farmModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployFarmModel(spFarm, farmModel);\r\n }\r\n // create you model\r\nvar farmModel = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n\r\n});\r\n\r\nvar spFarm = SPFarm.Local;\r\n\r\n// deploy site model with SharePoint Foundation SSOM API\r\nvar foundationProvisionService = new SSOMProvisionService();\r\nfoundationProvisionService.DeployFarmModel(spFarm, farmModel);\r\n\r\n// deploy site model with SharePoint Standard SSOM API\r\nvar standardProvisionService = new StandardSSOMProvisionService();\r\nstandardProvisionService.DeployFarmModel(spFarm, farmModel);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_FarmModel_SSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_FarmModel_SSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample Deploy_WebApplicationModel_SSOM = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_WebApplicationModel_SSOM\r\n \r\n \r\n \r\n public void Deploy_WebApplicationModel_SSOM()\r\n {\r\n // setup url\r\n var webAppUrl = \"\";\r\n\r\n // create you model\r\n var webAppModel = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n\r\n });\r\n\r\n var spWebApp = SPWebApplication.Lookup(new Uri(webAppUrl));\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n }\r\n // setup url\r\nvar webAppUrl = \"\";\r\n\r\n// create you model\r\nvar webAppModel = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n\r\n});\r\n\r\nvar spWebApp = SPWebApplication.Lookup(new Uri(webAppUrl));\r\n\r\n// deploy site model with SharePoint Foundation SSOM API\r\nvar foundationProvisionService = new SSOMProvisionService();\r\nfoundationProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n\r\n// deploy site model with SharePoint Standard SSOM API\r\nvar standardProvisionService = new StandardSSOMProvisionService();\r\nstandardProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_WebApplicationModel_SSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_WebApplicationModel_SSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample Deploy_SiteModel_SSOM = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_SiteModel_SSOM\r\n \r\n \r\n \r\n public void Deploy_SiteModel_SSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(spSite, siteModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(spSite, siteModel);\r\n }\r\n }\r\n // setup url\r\nvar siteUrl = \"\";\r\n\r\n// create you model\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nusing (var spSite = new SPSite(siteUrl))\r\n{\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(spSite, siteModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(spSite, siteModel);\r\n}\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_SiteModel_SSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_SiteModel_SSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample Deploy_WebModel_SSOM = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n Deploy_WebModel_SSOM\r\n \r\n \r\n \r\n public void Deploy_WebModel_SSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(spWeb, webModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebModel(spWeb, webModel);\r\n }\r\n }\r\n }\r\n // setup url\r\nvar webUrl = \"\";\r\n\r\n// create you model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n});\r\n\r\nusing (var spSite = new SPSite(webUrl))\r\n{\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(spWeb, webModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebModel(spWeb, webModel);\r\n }\r\n}\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n Deploy_WebModel_SSOM\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.Deploy_WebModel_SSOM\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample DeployIncrementally_Default_SSOM = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n <Description />\r\n <MethodBodyWithFunction>public void DeployIncrementally_Default_SSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardSSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(spWeb, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(spWeb, webModel);\r\n }\r\n }\r\n }</MethodBodyWithFunction>\r\n <MethodBody>var webUrl = \"\";\r\n\r\n// create you models\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n});\r\n\r\nusing (var spSite = new SPSite(webUrl))\r\n{\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardSSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(spWeb, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(spWeb, webModel);\r\n }\r\n}\r\n\r\n</MethodBody>\r\n <Language>cs</Language>\r\n <Namespace>SubPointSolutions.Docs.Views.Views.SPMeta2.reference</Namespace>\r\n <ClassName>ProvisionServices</ClassName>\r\n <MethodName>DeployIncrementally_Default_SSOM</MethodName>\r\n <ClassComment />\r\n <MethodFullName>SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.DeployIncrementally_Default_SSOM</MethodFullName>\r\n <ClassFullName>SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices</ClassFullName>\r\n <MethodParametersCount>0</MethodParametersCount>\r\n <SourceFileName>ProvisionServices.cs</SourceFileName>\r\n <SourceFileNameWithoutExtension>ProvisionServices</SourceFileNameWithoutExtension>\r\n <SourceFileFolder>..\\..\\Views\\SPMeta2\\reference</SourceFileFolder>\r\n <SourceFilePath>..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs</SourceFilePath>\r\n</DocSample>"); + public static SubPointSolutions.Docs.Code.Data.DocSample DeployIncrementally_Default_CSOM = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<DocSample xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n <IsMethod>true</IsMethod>\r\n <IsClass>false</IsClass>\r\n <Tags />\r\n <Title />\r\n <Description />\r\n <MethodBodyWithFunction>public void DeployIncrementally_Default_CSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardCSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(clientContext, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(clientContext, webModel);\r\n }\r\n }</MethodBodyWithFunction>\r\n <MethodBody>var webUrl = \"\";\r\n\r\n// create you models\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n});\r\n\r\n// setup client context\r\nusing (var clientContext = new ClientContext(siteUrl))\r\n{\r\n // deploy site model incrementally\r\n var provisionService = new StandardCSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(clientContext, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(clientContext, webModel);\r\n}\r\n\r\n</MethodBody>\r\n <Language>cs</Language>\r\n <Namespace>SubPointSolutions.Docs.Views.Views.SPMeta2.reference</Namespace>\r\n <ClassName>ProvisionServices</ClassName>\r\n <MethodName>DeployIncrementally_Default_CSOM</MethodName>\r\n <ClassComment />\r\n <MethodFullName>SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices.DeployIncrementally_Default_CSOM</MethodFullName>\r\n <ClassFullName>SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices</ClassFullName>\r\n <MethodParametersCount>0</MethodParametersCount>\r\n <SourceFileName>ProvisionServices.cs</SourceFileName>\r\n <SourceFileNameWithoutExtension>ProvisionServices</SourceFileNameWithoutExtension>\r\n <SourceFileFolder>..\\..\\Views\\SPMeta2\\reference</SourceFileFolder>\r\n <SourceFilePath>..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs</SourceFilePath>\r\n</DocSample>"); + public static SubPointSolutions.Docs.Code.Data.DocSample ProvisionServicesClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<DocSample xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n <IsMethod>false</IsMethod>\r\n <IsClass>true</IsClass>\r\n <Tags />\r\n <Title>ProvisionServices\r\n \r\n \r\n public class ProvisionServices : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_SiteModel_CSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(clientContext, siteModel);\r\n\r\n // deploy site model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(clientContext, siteModel);\r\n }\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebModel_CSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(webUrl))\r\n {\r\n // deploy web model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(clientContext, webModel);\r\n\r\n // deploy web model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeployWebModel(clientContext, webModel);\r\n }\r\n }\r\n\r\n #region ssom\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_FarmModel_SSOM()\r\n {\r\n // create you model\r\n var farmModel = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n\r\n });\r\n\r\n var spFarm = SPFarm.Local;\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployFarmModel(spFarm, farmModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployFarmModel(spFarm, farmModel);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebApplicationModel_SSOM()\r\n {\r\n // setup url\r\n var webAppUrl = \"\";\r\n\r\n // create you model\r\n var webAppModel = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n\r\n });\r\n\r\n var spWebApp = SPWebApplication.Lookup(new Uri(webAppUrl));\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_SiteModel_SSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(spSite, siteModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(spSite, siteModel);\r\n }\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebModel_SSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(spWeb, webModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebModel(spWeb, webModel);\r\n }\r\n }\r\n }\r\n\r\n #endregion\r\n\r\n #region incremental\r\n\r\n public void DeployIncrementally_Default_SSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardSSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(spWeb, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(spWeb, webModel);\r\n }\r\n }\r\n }\r\n public void DeployIncrementally_Default_CSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardCSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(clientContext, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(clientContext, webModel);\r\n }\r\n }\r\n\r\n\r\n #endregion\r\n\r\n #endregion\r\n }\r\n public class ProvisionServices : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_SiteModel_CSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(clientContext, siteModel);\r\n\r\n // deploy site model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(clientContext, siteModel);\r\n }\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebModel_CSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(webUrl))\r\n {\r\n // deploy web model with SharePoint Foundation CSOM API\r\n var foundationProvisionService = new CSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(clientContext, webModel);\r\n\r\n // deploy web model with SharePoint Standard CSOM API\r\n var standardProvisionService = new StandardCSOMProvisionService();\r\n standardProvisionService.DeployWebModel(clientContext, webModel);\r\n }\r\n }\r\n\r\n #region ssom\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_FarmModel_SSOM()\r\n {\r\n // create you model\r\n var farmModel = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n\r\n });\r\n\r\n var spFarm = SPFarm.Local;\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployFarmModel(spFarm, farmModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployFarmModel(spFarm, farmModel);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebApplicationModel_SSOM()\r\n {\r\n // setup url\r\n var webAppUrl = \"\";\r\n\r\n // create you model\r\n var webAppModel = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n\r\n });\r\n\r\n var spWebApp = SPWebApplication.Lookup(new Uri(webAppUrl));\r\n\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebApplicationModel(spWebApp, webAppModel);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_SiteModel_SSOM()\r\n {\r\n // setup url\r\n var siteUrl = \"\";\r\n\r\n // create you model\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(siteUrl))\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeploySiteModel(spSite, siteModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeploySiteModel(spSite, siteModel);\r\n }\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ProvisionServices\")]\r\n public void Deploy_WebModel_SSOM()\r\n {\r\n // setup url\r\n var webUrl = \"\";\r\n\r\n // create you model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model with SharePoint Foundation SSOM API\r\n var foundationProvisionService = new SSOMProvisionService();\r\n foundationProvisionService.DeployWebModel(spWeb, webModel);\r\n\r\n // deploy site model with SharePoint Standard SSOM API\r\n var standardProvisionService = new StandardSSOMProvisionService();\r\n standardProvisionService.DeployWebModel(spWeb, webModel);\r\n }\r\n }\r\n }\r\n\r\n #endregion\r\n\r\n #region incremental\r\n\r\n public void DeployIncrementally_Default_SSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n using (var spSite = new SPSite(webUrl))\r\n {\r\n using (var spWeb = spSite.OpenWeb())\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardSSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(spWeb, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(spWeb, webModel);\r\n }\r\n }\r\n }\r\n public void DeployIncrementally_Default_CSOM()\r\n {\r\n var webUrl = \"\";\r\n\r\n // create you models\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n });\r\n\r\n // setup client context\r\n using (var clientContext = new ClientContext(siteUrl))\r\n {\r\n // deploy site model incrementally\r\n var provisionService = new StandardCSOMProvisionService();\r\n provisionService.DeploySiteModelIncrementally(clientContext, siteModel);\r\n\r\n // deploy web model incrementally\r\n provisionService.DeployWebModelIncrementally(clientContext, webModel);\r\n }\r\n }\r\n\r\n\r\n #endregion\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n ProvisionServices\r\n ProvisionServicesClass\r\n \r\n ClassProvisionServicesClass\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.ProvisionServices\r\n 0\r\n ProvisionServices.cs\r\n ProvisionServices\r\n ..\\..\\Views\\SPMeta2\\reference\r\n ..\\..\\Views\\SPMeta2\\reference\\ProvisionServices.cs\r\n"); + } + public static class SiteModel { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { @@ -549,53 +583,53 @@ public static class AlternateUrlDefinitionTests public static class AppDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add app\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version \r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var appDef = new AppDefinition\r\n{\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version\r\n Version = \"1.0.0.0\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddApp(appDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppDefinitionTests\r\n CanDeploySimpleAppDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests.CanDeploySimpleAppDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests\r\n 0\r\n AppDefinitionTests.cs\r\n AppDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Site collection\r\n Web site\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n AppDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n \r\n\r\n public class AppDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version \r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n\r\n\r\npublic class AppDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version\r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppDefinitionTests\r\n AppDefinitionTestsClass\r\n \r\n ClassAppDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests\r\n 0\r\n AppDefinitionTests.cs\r\n AppDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Web site\r\n \r\n \r\n \r\n Add app\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version \r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var appDef = new AppDefinition\r\n{\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version\r\n Version = \"1.0.0.0\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddApp(appDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppDefinitionTests\r\n CanDeploySimpleAppDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests.CanDeploySimpleAppDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests\r\n 0\r\n AppDefinitionTests.cs\r\n AppDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Web site\r\n Site collection\r\n Web site\r\n \r\n \r\n \r\n AppDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n \r\n\r\n public class AppDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version \r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n\r\n\r\npublic class AppDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version\r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppDefinitionTests\r\n AppDefinitionTestsClass\r\n \r\n ClassAppDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests\r\n 0\r\n AppDefinitionTests.cs\r\n AppDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleAppDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add app\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version \r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var appDef = new AppDefinition\r\n{\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version\r\n Version = \"1.0.0.0\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddApp(appDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppDefinitionTests\r\n CanDeploySimpleAppDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests.CanDeploySimpleAppDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests\r\n 0\r\n AppDefinitionTests.cs\r\n AppDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample AppDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Site collection\r\n Web site\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n AppDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n \r\n\r\n public class AppDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version \r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n\r\n\r\npublic class AppDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version\r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppDefinitionTests\r\n AppDefinitionTestsClass\r\n \r\n ClassAppDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests\r\n 0\r\n AppDefinitionTests.cs\r\n AppDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleAppDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Web site\r\n \r\n \r\n \r\n Add app\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version \r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var appDef = new AppDefinition\r\n{\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version\r\n Version = \"1.0.0.0\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddApp(appDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppDefinitionTests\r\n CanDeploySimpleAppDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests.CanDeploySimpleAppDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests\r\n 0\r\n AppDefinitionTests.cs\r\n AppDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample AppDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Web site\r\n Site collection\r\n Web site\r\n \r\n \r\n \r\n AppDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n \r\n\r\n public class AppDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version \r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n\r\n\r\npublic class AppDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAppDefinition()\r\n {\r\n var appDef = new AppDefinition\r\n {\r\n Content = File.ReadAllBytes(\"path-to-your-app-file\"),\r\n ProductId = new Guid(\"your-app-product-id\"),\r\n // your app version\r\n Version = \"1.0.0.0\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddApp(appDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppDefinitionTests\r\n AppDefinitionTestsClass\r\n \r\n ClassAppDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppDefinitionTests\r\n 0\r\n AppDefinitionTests.cs\r\n AppDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppDefinitionTests.cs\r\n"); } public static class AppPrincipalDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add app principal\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppPrincipalDefinitionTests\r\n CanDeploySimpleAppPrincipalDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests.CanDeploySimpleAppPrincipalDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests\r\n 0\r\n AppPrincipalDefinitionTests.cs\r\n AppPrincipalDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppPrincipalDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n AppPrincipalDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class AppPrincipalDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppPrincipalDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app principal\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AppPrincipalDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppPrincipalDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app principal\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppPrincipalDefinitionTests\r\n AppPrincipalDefinitionTestsClass\r\n \r\n ClassAppPrincipalDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests\r\n 0\r\n AppPrincipalDefinitionTests.cs\r\n AppPrincipalDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppPrincipalDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add app principal\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppPrincipalDefinitionTests\r\n CanDeploySimpleAppPrincipalDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests.CanDeploySimpleAppPrincipalDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests\r\n 0\r\n AppPrincipalDefinitionTests.cs\r\n AppPrincipalDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppPrincipalDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n AppPrincipalDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class AppPrincipalDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppPrincipalDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app principal\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AppPrincipalDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppPrincipalDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app principal\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppPrincipalDefinitionTests\r\n AppPrincipalDefinitionTestsClass\r\n \r\n ClassAppPrincipalDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests\r\n 0\r\n AppPrincipalDefinitionTests.cs\r\n AppPrincipalDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppPrincipalDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleAppPrincipalDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add app principal\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppPrincipalDefinitionTests\r\n CanDeploySimpleAppPrincipalDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests.CanDeploySimpleAppPrincipalDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests\r\n 0\r\n AppPrincipalDefinitionTests.cs\r\n AppPrincipalDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppPrincipalDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample AppPrincipalDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n AppPrincipalDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class AppPrincipalDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppPrincipalDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app principal\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AppPrincipalDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppPrincipalDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app principal\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppPrincipalDefinitionTests\r\n AppPrincipalDefinitionTestsClass\r\n \r\n ClassAppPrincipalDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests\r\n 0\r\n AppPrincipalDefinitionTests.cs\r\n AppPrincipalDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppPrincipalDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleAppPrincipalDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add app principal\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppPrincipalDefinitionTests\r\n CanDeploySimpleAppPrincipalDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests.CanDeploySimpleAppPrincipalDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests\r\n 0\r\n AppPrincipalDefinitionTests.cs\r\n AppPrincipalDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppPrincipalDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample AppPrincipalDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n AppPrincipalDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class AppPrincipalDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppPrincipalDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app principal\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AppPrincipalDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AppPrincipalDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add app principal\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleAppPrincipalDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AppPrincipalDefinitionTests\r\n AppPrincipalDefinitionTestsClass\r\n \r\n ClassAppPrincipalDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AppPrincipalDefinitionTests\r\n 0\r\n AppPrincipalDefinitionTests.cs\r\n AppPrincipalDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AppPrincipalDefinitionTests.cs\r\n"); } public static class AuditSettingsDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add audit settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AuditSettingsDefinitionTests\r\n CanDeploySimpleAuditSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests.CanDeploySimpleAuditSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests\r\n 0\r\n AuditSettingsDefinitionTests.cs\r\n AuditSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AuditSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n AuditSettingsDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class AuditSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AuditSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audit settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AuditSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AuditSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audit settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AuditSettingsDefinitionTests\r\n AuditSettingsDefinitionTestsClass\r\n \r\n ClassAuditSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests\r\n 0\r\n AuditSettingsDefinitionTests.cs\r\n AuditSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AuditSettingsDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Add audit settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AuditSettingsDefinitionTests\r\n CanDeploySimpleAuditSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests.CanDeploySimpleAuditSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests\r\n 0\r\n AuditSettingsDefinitionTests.cs\r\n AuditSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AuditSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n AuditSettingsDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class AuditSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AuditSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audit settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AuditSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AuditSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audit settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AuditSettingsDefinitionTests\r\n AuditSettingsDefinitionTestsClass\r\n \r\n ClassAuditSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests\r\n 0\r\n AuditSettingsDefinitionTests.cs\r\n AuditSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AuditSettingsDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleAuditSettingsDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add audit settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AuditSettingsDefinitionTests\r\n CanDeploySimpleAuditSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests.CanDeploySimpleAuditSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests\r\n 0\r\n AuditSettingsDefinitionTests.cs\r\n AuditSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AuditSettingsDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample AuditSettingsDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n AuditSettingsDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class AuditSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AuditSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audit settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AuditSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AuditSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audit settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AuditSettingsDefinitionTests\r\n AuditSettingsDefinitionTestsClass\r\n \r\n ClassAuditSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests\r\n 0\r\n AuditSettingsDefinitionTests.cs\r\n AuditSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AuditSettingsDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleAuditSettingsDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Add audit settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AuditSettingsDefinitionTests\r\n CanDeploySimpleAuditSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests.CanDeploySimpleAuditSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests\r\n 0\r\n AuditSettingsDefinitionTests.cs\r\n AuditSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AuditSettingsDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample AuditSettingsDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n AuditSettingsDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class AuditSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AuditSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audit settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AuditSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AuditSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audit settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAuditSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AuditSettingsDefinitionTests\r\n AuditSettingsDefinitionTestsClass\r\n \r\n ClassAuditSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AuditSettingsDefinitionTests\r\n 0\r\n AuditSettingsDefinitionTests.cs\r\n AuditSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\AuditSettingsDefinitionTests.cs\r\n"); } public static class BooleanFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add boolean field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BooleanFieldDefinitionTests\r\n CanDeploySimpleBooleanFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests.CanDeploySimpleBooleanFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests\r\n 0\r\n BooleanFieldDefinitionTests.cs\r\n BooleanFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BooleanFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n BooleanFieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class BooleanFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BooleanFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add boolean field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class BooleanFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BooleanFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add boolean field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BooleanFieldDefinitionTests\r\n BooleanFieldDefinitionTestsClass\r\n \r\n ClassBooleanFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests\r\n 0\r\n BooleanFieldDefinitionTests.cs\r\n BooleanFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BooleanFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add boolean field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BooleanFieldDefinitionTests\r\n CanDeploySimpleBooleanFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests.CanDeploySimpleBooleanFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests\r\n 0\r\n BooleanFieldDefinitionTests.cs\r\n BooleanFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BooleanFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n BooleanFieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class BooleanFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BooleanFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add boolean field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class BooleanFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BooleanFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add boolean field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BooleanFieldDefinitionTests\r\n BooleanFieldDefinitionTestsClass\r\n \r\n ClassBooleanFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests\r\n 0\r\n BooleanFieldDefinitionTests.cs\r\n BooleanFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BooleanFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleBooleanFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add boolean field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BooleanFieldDefinitionTests\r\n CanDeploySimpleBooleanFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests.CanDeploySimpleBooleanFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests\r\n 0\r\n BooleanFieldDefinitionTests.cs\r\n BooleanFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BooleanFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample BooleanFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n BooleanFieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class BooleanFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BooleanFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add boolean field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class BooleanFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BooleanFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add boolean field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BooleanFieldDefinitionTests\r\n BooleanFieldDefinitionTestsClass\r\n \r\n ClassBooleanFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests\r\n 0\r\n BooleanFieldDefinitionTests.cs\r\n BooleanFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BooleanFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleBooleanFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add boolean field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BooleanFieldDefinitionTests\r\n CanDeploySimpleBooleanFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests.CanDeploySimpleBooleanFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests\r\n 0\r\n BooleanFieldDefinitionTests.cs\r\n BooleanFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BooleanFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample BooleanFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n BooleanFieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class BooleanFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BooleanFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add boolean field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class BooleanFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BooleanFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add boolean field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleBooleanFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BooleanFieldDefinitionTests\r\n BooleanFieldDefinitionTestsClass\r\n \r\n ClassBooleanFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BooleanFieldDefinitionTests\r\n 0\r\n BooleanFieldDefinitionTests.cs\r\n BooleanFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BooleanFieldDefinitionTests.cs\r\n"); } public static class BreakRoleInheritanceDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Break role inheritance on web\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var privateProjectWebDef = new WebDefinition\r\n{\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n{\r\n CopyRoleAssignments = false\r\n};\r\n\r\nvar privateSecurityGroupMembers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Members\"\r\n};\r\n\r\nvar privateSecurityGroupViewers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Viewers\"\r\n};\r\n\r\n// site model with the groups\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n);\r\n\r\n// web model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n});\r\n\r\n// deploy site model with groups, and then web model with the rest\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n CanDeploySimpleBreakRoleInheritance_OnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests.CanDeploySimpleBreakRoleInheritance_OnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Break role inheritance on list\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var privateListDef = new ListDefinition\r\n{\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n};\r\n\r\nvar privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n{\r\n CopyRoleAssignments = false\r\n};\r\n\r\nvar privateSecurityGroupMembers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Members\"\r\n};\r\n\r\nvar privateSecurityGroupViewers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Viewers\"\r\n};\r\n\r\n// site model with the groups\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n});\r\n\r\n// web model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n});\r\n\r\n// deploy site model with groups, and then web model with the rest\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n CanDeploySimpleBreakRoleInheritance_OnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests.CanDeploySimpleBreakRoleInheritance_OnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n BreakRoleInheritanceDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class BreakRoleInheritanceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class BreakRoleInheritanceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n BreakRoleInheritanceDefinitionTestsClass\r\n \r\n ClassBreakRoleInheritanceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Break role inheritance on web\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var privateProjectWebDef = new WebDefinition\r\n{\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n{\r\n CopyRoleAssignments = false\r\n};\r\n\r\nvar privateSecurityGroupMembers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Members\"\r\n};\r\n\r\nvar privateSecurityGroupViewers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Viewers\"\r\n};\r\n\r\n// site model with the groups\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n);\r\n\r\n// web model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n});\r\n\r\n// deploy site model with groups, and then web model with the rest\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n CanDeploySimpleBreakRoleInheritance_OnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests.CanDeploySimpleBreakRoleInheritance_OnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Break role inheritance on list\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var privateListDef = new ListDefinition\r\n{\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n};\r\n\r\nvar privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n{\r\n CopyRoleAssignments = false\r\n};\r\n\r\nvar privateSecurityGroupMembers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Members\"\r\n};\r\n\r\nvar privateSecurityGroupViewers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Viewers\"\r\n};\r\n\r\n// site model with the groups\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n});\r\n\r\n// web model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n});\r\n\r\n// deploy site model with groups, and then web model with the rest\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n CanDeploySimpleBreakRoleInheritance_OnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests.CanDeploySimpleBreakRoleInheritance_OnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n BreakRoleInheritanceDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class BreakRoleInheritanceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class BreakRoleInheritanceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n BreakRoleInheritanceDefinitionTestsClass\r\n \r\n ClassBreakRoleInheritanceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleBreakRoleInheritance_OnWeb = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Break role inheritance on web\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var privateProjectWebDef = new WebDefinition\r\n{\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n{\r\n CopyRoleAssignments = false\r\n};\r\n\r\nvar privateSecurityGroupMembers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Members\"\r\n};\r\n\r\nvar privateSecurityGroupViewers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Viewers\"\r\n};\r\n\r\n// site model with the groups\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n);\r\n\r\n// web model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n});\r\n\r\n// deploy site model with groups, and then web model with the rest\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n CanDeploySimpleBreakRoleInheritance_OnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests.CanDeploySimpleBreakRoleInheritance_OnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleBreakRoleInheritance_OnList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Break role inheritance on list\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var privateListDef = new ListDefinition\r\n{\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n};\r\n\r\nvar privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n{\r\n CopyRoleAssignments = false\r\n};\r\n\r\nvar privateSecurityGroupMembers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Members\"\r\n};\r\n\r\nvar privateSecurityGroupViewers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Viewers\"\r\n};\r\n\r\n// site model with the groups\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n});\r\n\r\n// web model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n});\r\n\r\n// deploy site model with groups, and then web model with the rest\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n CanDeploySimpleBreakRoleInheritance_OnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests.CanDeploySimpleBreakRoleInheritance_OnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample BreakRoleInheritanceDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n BreakRoleInheritanceDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class BreakRoleInheritanceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class BreakRoleInheritanceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n BreakRoleInheritanceDefinitionTestsClass\r\n \r\n ClassBreakRoleInheritanceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleBreakRoleInheritance_OnWeb = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Break role inheritance on web\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var privateProjectWebDef = new WebDefinition\r\n{\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n{\r\n CopyRoleAssignments = false\r\n};\r\n\r\nvar privateSecurityGroupMembers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Members\"\r\n};\r\n\r\nvar privateSecurityGroupViewers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Viewers\"\r\n};\r\n\r\n// site model with the groups\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n);\r\n\r\n// web model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n});\r\n\r\n// deploy site model with groups, and then web model with the rest\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n CanDeploySimpleBreakRoleInheritance_OnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests.CanDeploySimpleBreakRoleInheritance_OnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleBreakRoleInheritance_OnList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Break role inheritance on list\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var privateListDef = new ListDefinition\r\n{\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n};\r\n\r\nvar privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n{\r\n CopyRoleAssignments = false\r\n};\r\n\r\nvar privateSecurityGroupMembers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Members\"\r\n};\r\n\r\nvar privateSecurityGroupViewers = new SecurityGroupDefinition\r\n{\r\n Name = \"Private Project Group Viewers\"\r\n};\r\n\r\n// site model with the groups\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n});\r\n\r\n// web model\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n});\r\n\r\n// deploy site model with groups, and then web model with the rest\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n CanDeploySimpleBreakRoleInheritance_OnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests.CanDeploySimpleBreakRoleInheritance_OnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample BreakRoleInheritanceDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n BreakRoleInheritanceDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class BreakRoleInheritanceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model \r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames \r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class BreakRoleInheritanceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnWeb()\r\n {\r\n var privateProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Private project\",\r\n Url = \"private-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(privateProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateProjectResetWeb =>\r\n {\r\n // privateProjectResetWeb is your web but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateProjectResetWeb.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.BreakRoleInheritanceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Break role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySimpleBreakRoleInheritance_OnList()\r\n {\r\n var privateListDef = new ListDefinition\r\n {\r\n Title = \"Private records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/private-records\",\r\n };\r\n\r\n var privateProjectWebBreakRoleInheritance = new BreakRoleInheritanceDefinition\r\n {\r\n CopyRoleAssignments = false\r\n };\r\n\r\n var privateSecurityGroupMembers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Members\"\r\n };\r\n\r\n var privateSecurityGroupViewers = new SecurityGroupDefinition\r\n {\r\n Name = \"Private Project Group Viewers\"\r\n };\r\n\r\n // site model with the groups\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(privateSecurityGroupMembers);\r\n site.AddSecurityGroup(privateSecurityGroupViewers);\r\n });\r\n\r\n // web model\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(privateListDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddBreakRoleInheritance(privateProjectWebBreakRoleInheritance, privateResetList =>\r\n {\r\n // privateResetList is your list but after breaking role inheritance\r\n\r\n // link group with roles by SecurityRoleType / SecurityRoleName\r\n // use BuiltInSecurityRoleTypes or BuiltInSecurityRoleNames\r\n\r\n // add group with contributor permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupMembers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Contributor\r\n });\r\n });\r\n\r\n // add group with reader permission\r\n privateResetList.AddSecurityGroupLink(privateSecurityGroupViewers, group =>\r\n {\r\n group.AddSecurityRoleLink(new SecurityRoleLinkDefinition\r\n {\r\n SecurityRoleType = BuiltInSecurityRoleTypes.Reader\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n // deploy site model with groups, and then web model with the rest\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n BreakRoleInheritanceDefinitionTests\r\n BreakRoleInheritanceDefinitionTestsClass\r\n \r\n ClassBreakRoleInheritanceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.BreakRoleInheritanceDefinitionTests\r\n 0\r\n BreakRoleInheritanceDefinitionTests.cs\r\n BreakRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\BreakRoleInheritanceDefinitionTests.cs\r\n"); } public static class BusinessDataFieldDefinitionTests @@ -611,21 +645,21 @@ public static class BusinessDataFieldDefinitionTests public static class CalculatedFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add calculated field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CalculatedFieldDefinitionTests\r\n CanDeploySimpleCalculatedFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests.CanDeploySimpleCalculatedFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests\r\n 0\r\n CalculatedFieldDefinitionTests.cs\r\n CalculatedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CalculatedFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n CalculatedFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CalculatedFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CalculatedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add calculated field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CalculatedFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CalculatedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add calculated field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CalculatedFieldDefinitionTests\r\n CalculatedFieldDefinitionTestsClass\r\n \r\n ClassCalculatedFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests\r\n 0\r\n CalculatedFieldDefinitionTests.cs\r\n CalculatedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CalculatedFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add calculated field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CalculatedFieldDefinitionTests\r\n CanDeploySimpleCalculatedFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests.CanDeploySimpleCalculatedFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests\r\n 0\r\n CalculatedFieldDefinitionTests.cs\r\n CalculatedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CalculatedFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n CalculatedFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CalculatedFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CalculatedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add calculated field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CalculatedFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CalculatedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add calculated field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CalculatedFieldDefinitionTests\r\n CalculatedFieldDefinitionTestsClass\r\n \r\n ClassCalculatedFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests\r\n 0\r\n CalculatedFieldDefinitionTests.cs\r\n CalculatedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CalculatedFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleCalculatedFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add calculated field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CalculatedFieldDefinitionTests\r\n CanDeploySimpleCalculatedFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests.CanDeploySimpleCalculatedFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests\r\n 0\r\n CalculatedFieldDefinitionTests.cs\r\n CalculatedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CalculatedFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CalculatedFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n CalculatedFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CalculatedFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CalculatedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add calculated field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CalculatedFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CalculatedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add calculated field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CalculatedFieldDefinitionTests\r\n CalculatedFieldDefinitionTestsClass\r\n \r\n ClassCalculatedFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests\r\n 0\r\n CalculatedFieldDefinitionTests.cs\r\n CalculatedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CalculatedFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleCalculatedFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add calculated field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CalculatedFieldDefinitionTests\r\n CanDeploySimpleCalculatedFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests.CanDeploySimpleCalculatedFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests\r\n 0\r\n CalculatedFieldDefinitionTests.cs\r\n CalculatedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CalculatedFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CalculatedFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n CalculatedFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CalculatedFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CalculatedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add calculated field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CalculatedFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CalculatedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add calculated field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCalculatedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CalculatedFieldDefinitionTests\r\n CalculatedFieldDefinitionTestsClass\r\n \r\n ClassCalculatedFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CalculatedFieldDefinitionTests\r\n 0\r\n CalculatedFieldDefinitionTests.cs\r\n CalculatedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CalculatedFieldDefinitionTests.cs\r\n"); } public static class ChoiceFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add choice field\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var fieldDef = new ChoiceFieldDefinition\r\n{\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddChoiceField(fieldDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ChoiceFieldDefinitionTests\r\n CanDeploySimpleChoiceFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests.CanDeploySimpleChoiceFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests\r\n 0\r\n ChoiceFieldDefinitionTests.cs\r\n ChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ChoiceFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n ChoiceFieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ChoiceFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add choice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ChoiceFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add choice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ChoiceFieldDefinitionTests\r\n ChoiceFieldDefinitionTestsClass\r\n \r\n ClassChoiceFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests\r\n 0\r\n ChoiceFieldDefinitionTests.cs\r\n ChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ChoiceFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add choice field\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var fieldDef = new ChoiceFieldDefinition\r\n{\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddChoiceField(fieldDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ChoiceFieldDefinitionTests\r\n CanDeploySimpleChoiceFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests.CanDeploySimpleChoiceFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests\r\n 0\r\n ChoiceFieldDefinitionTests.cs\r\n ChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ChoiceFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n ChoiceFieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ChoiceFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add choice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ChoiceFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add choice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ChoiceFieldDefinitionTests\r\n ChoiceFieldDefinitionTestsClass\r\n \r\n ClassChoiceFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests\r\n 0\r\n ChoiceFieldDefinitionTests.cs\r\n ChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ChoiceFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleChoiceFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add choice field\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var fieldDef = new ChoiceFieldDefinition\r\n{\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddChoiceField(fieldDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ChoiceFieldDefinitionTests\r\n CanDeploySimpleChoiceFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests.CanDeploySimpleChoiceFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests\r\n 0\r\n ChoiceFieldDefinitionTests.cs\r\n ChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ChoiceFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ChoiceFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n ChoiceFieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ChoiceFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add choice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ChoiceFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add choice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ChoiceFieldDefinitionTests\r\n ChoiceFieldDefinitionTestsClass\r\n \r\n ClassChoiceFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests\r\n 0\r\n ChoiceFieldDefinitionTests.cs\r\n ChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ChoiceFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleChoiceFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add choice field\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var fieldDef = new ChoiceFieldDefinition\r\n{\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddChoiceField(fieldDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ChoiceFieldDefinitionTests\r\n CanDeploySimpleChoiceFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests.CanDeploySimpleChoiceFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests\r\n 0\r\n ChoiceFieldDefinitionTests.cs\r\n ChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ChoiceFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ChoiceFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n ChoiceFieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ChoiceFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add choice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ChoiceFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add choice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleChoiceFieldDefinition()\r\n {\r\n var fieldDef = new ChoiceFieldDefinition\r\n {\r\n Title = \"Tasks status\",\r\n InternalName = \"dcs_ProgressStatus\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"759f97a7-c26f-4dc3-b3fa-47250f168ba4\"),\r\n Choices = new Collection<string>\r\n {\r\n \"Not stated\",\r\n \"In progress\",\r\n \"Done\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ChoiceFieldDefinitionTests\r\n ChoiceFieldDefinitionTestsClass\r\n \r\n ClassChoiceFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ChoiceFieldDefinitionTests\r\n 0\r\n ChoiceFieldDefinitionTests.cs\r\n ChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ChoiceFieldDefinitionTests.cs\r\n"); } public static class ClientWebPartDefinitionTests @@ -641,55 +675,55 @@ public static class ClientWebPartDefinitionTests public static class ComputedFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add computed field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ComputedFieldDefinitionTests\r\n CanDeploySimpleComputedFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests.CanDeploySimpleComputedFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests\r\n 0\r\n ComputedFieldDefinitionTests.cs\r\n ComputedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ComputedFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n ComputedFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ComputedFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ComputedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add computed field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ComputedFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ComputedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add computed field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ComputedFieldDefinitionTests\r\n ComputedFieldDefinitionTestsClass\r\n \r\n ClassComputedFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests\r\n 0\r\n ComputedFieldDefinitionTests.cs\r\n ComputedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ComputedFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add computed field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ComputedFieldDefinitionTests\r\n CanDeploySimpleComputedFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests.CanDeploySimpleComputedFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests\r\n 0\r\n ComputedFieldDefinitionTests.cs\r\n ComputedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ComputedFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n ComputedFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ComputedFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ComputedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add computed field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ComputedFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ComputedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add computed field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ComputedFieldDefinitionTests\r\n ComputedFieldDefinitionTestsClass\r\n \r\n ClassComputedFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests\r\n 0\r\n ComputedFieldDefinitionTests.cs\r\n ComputedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ComputedFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleComputedFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add computed field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ComputedFieldDefinitionTests\r\n CanDeploySimpleComputedFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests.CanDeploySimpleComputedFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests\r\n 0\r\n ComputedFieldDefinitionTests.cs\r\n ComputedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ComputedFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ComputedFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n ComputedFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ComputedFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ComputedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add computed field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ComputedFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ComputedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add computed field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ComputedFieldDefinitionTests\r\n ComputedFieldDefinitionTestsClass\r\n \r\n ClassComputedFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests\r\n 0\r\n ComputedFieldDefinitionTests.cs\r\n ComputedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ComputedFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleComputedFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add computed field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ComputedFieldDefinitionTests\r\n CanDeploySimpleComputedFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests.CanDeploySimpleComputedFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests\r\n 0\r\n ComputedFieldDefinitionTests.cs\r\n ComputedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ComputedFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ComputedFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n ComputedFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ComputedFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ComputedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add computed field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ComputedFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ComputedFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add computed field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleComputedFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ComputedFieldDefinitionTests\r\n ComputedFieldDefinitionTestsClass\r\n \r\n ClassComputedFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ComputedFieldDefinitionTests\r\n 0\r\n ComputedFieldDefinitionTests.cs\r\n ComputedFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ComputedFieldDefinitionTests.cs\r\n"); } public static class ContentDatabaseDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category Order\r\n \r\n 100\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Add content database\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var contentDb1 = new ContentDatabaseDefinition\r\n{\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n};\r\n\r\nvar contentDb2 = new ContentDatabaseDefinition\r\n{\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentDatabaseDefinitionTests\r\n CanDeploySimpleContentDatabaseDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests.CanDeploySimpleContentDatabaseDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests\r\n 0\r\n ContentDatabaseDefinitionTests.cs\r\n ContentDatabaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentDatabaseDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category Order\r\n \r\n 100\r\n 100\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n ContentDatabaseDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentDatabaseDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentDatabaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content database\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentDatabaseDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentDatabaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content database\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentDatabaseDefinitionTests\r\n ContentDatabaseDefinitionTestsClass\r\n \r\n ClassContentDatabaseDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests\r\n 0\r\n ContentDatabaseDefinitionTests.cs\r\n ContentDatabaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentDatabaseDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category Order\r\n \r\n 100\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Add content database\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var contentDb1 = new ContentDatabaseDefinition\r\n{\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n};\r\n\r\nvar contentDb2 = new ContentDatabaseDefinition\r\n{\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentDatabaseDefinitionTests\r\n CanDeploySimpleContentDatabaseDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests.CanDeploySimpleContentDatabaseDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests\r\n 0\r\n ContentDatabaseDefinitionTests.cs\r\n ContentDatabaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentDatabaseDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category Order\r\n \r\n 100\r\n 100\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n ContentDatabaseDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentDatabaseDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentDatabaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content database\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentDatabaseDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentDatabaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content database\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentDatabaseDefinitionTests\r\n ContentDatabaseDefinitionTestsClass\r\n \r\n ClassContentDatabaseDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests\r\n 0\r\n ContentDatabaseDefinitionTests.cs\r\n ContentDatabaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentDatabaseDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleContentDatabaseDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category Order\r\n \r\n 100\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Add content database\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var contentDb1 = new ContentDatabaseDefinition\r\n{\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n};\r\n\r\nvar contentDb2 = new ContentDatabaseDefinition\r\n{\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentDatabaseDefinitionTests\r\n CanDeploySimpleContentDatabaseDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests.CanDeploySimpleContentDatabaseDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests\r\n 0\r\n ContentDatabaseDefinitionTests.cs\r\n ContentDatabaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentDatabaseDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ContentDatabaseDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category Order\r\n \r\n 100\r\n 100\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n ContentDatabaseDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentDatabaseDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentDatabaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content database\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentDatabaseDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentDatabaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content database\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentDatabaseDefinitionTests\r\n ContentDatabaseDefinitionTestsClass\r\n \r\n ClassContentDatabaseDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests\r\n 0\r\n ContentDatabaseDefinitionTests.cs\r\n ContentDatabaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentDatabaseDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleContentDatabaseDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category Order\r\n \r\n 100\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Add content database\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var contentDb1 = new ContentDatabaseDefinition\r\n{\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n};\r\n\r\nvar contentDb2 = new ContentDatabaseDefinition\r\n{\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentDatabaseDefinitionTests\r\n CanDeploySimpleContentDatabaseDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests.CanDeploySimpleContentDatabaseDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests\r\n 0\r\n ContentDatabaseDefinitionTests.cs\r\n ContentDatabaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentDatabaseDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ContentDatabaseDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category Order\r\n \r\n 100\r\n 100\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n ContentDatabaseDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentDatabaseDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentDatabaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content database\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentDatabaseDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentDatabaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content database\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentDatabaseDefinition()\r\n {\r\n var contentDb1 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db1\"\r\n };\r\n\r\n var contentDb2 = new ContentDatabaseDefinition\r\n {\r\n ServerName = \"localhost\",\r\n DbName = \"intranet_content_db2\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp\r\n .AddContentDatabase(contentDb1)\r\n .AddContentDatabase(contentDb2);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentDatabaseDefinitionTests\r\n ContentDatabaseDefinitionTestsClass\r\n \r\n ClassContentDatabaseDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentDatabaseDefinitionTests\r\n 0\r\n ContentDatabaseDefinitionTests.cs\r\n ContentDatabaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentDatabaseDefinitionTests.cs\r\n"); } public static class ContentEditorWebPartDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeploEmptyContentEditorWebpart\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeploEmptyContentEditorWebpart\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP with link\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var htmlContent = new ModuleFileDefinition\r\n{\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n};\r\n\r\nvar cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeploContentEditorWebpartWithUrlLink\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeploContentEditorWebpartWithUrlLink\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP with content\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeployContentEditorWebpartWithContent\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeployContentEditorWebpartWithContent\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ContentEditorWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentEditorWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with link\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentEditorWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with link\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n ContentEditorWebPartDefinitionTestsClass\r\n \r\n ClassContentEditorWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeploEmptyContentEditorWebpart\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeploEmptyContentEditorWebpart\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP with link\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var htmlContent = new ModuleFileDefinition\r\n{\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n};\r\n\r\nvar cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeploContentEditorWebpartWithUrlLink\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeploContentEditorWebpartWithUrlLink\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP with content\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeployContentEditorWebpartWithContent\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeployContentEditorWebpartWithContent\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ContentEditorWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentEditorWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with link\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentEditorWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with link\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n ContentEditorWebPartDefinitionTestsClass\r\n \r\n ClassContentEditorWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploEmptyContentEditorWebpart = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeploEmptyContentEditorWebpart\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeploEmptyContentEditorWebpart\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploContentEditorWebpartWithUrlLink = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP with link\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var htmlContent = new ModuleFileDefinition\r\n{\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n};\r\n\r\nvar cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeploContentEditorWebpartWithUrlLink\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeploContentEditorWebpartWithUrlLink\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployContentEditorWebpartWithContent = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP with content\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeployContentEditorWebpartWithContent\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeployContentEditorWebpartWithContent\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ContentEditorWebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ContentEditorWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentEditorWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with link\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentEditorWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with link\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n ContentEditorWebPartDefinitionTestsClass\r\n \r\n ClassContentEditorWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploEmptyContentEditorWebpart = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeploEmptyContentEditorWebpart\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeploEmptyContentEditorWebpart\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploContentEditorWebpartWithUrlLink = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP with link\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var htmlContent = new ModuleFileDefinition\r\n{\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n};\r\n\r\nvar cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeploContentEditorWebpartWithUrlLink\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeploContentEditorWebpartWithUrlLink\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployContentEditorWebpartWithContent = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add CEWP with content\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var cewp = new ContentEditorWebPartDefinition\r\n{\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n CanDeployContentEditorWebpartWithContent\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests.CanDeployContentEditorWebpartWithContent\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ContentEditorWebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ContentEditorWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentEditorWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with link\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentEditorWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploEmptyContentEditorWebpart()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Empty Content Editor Webpart\",\r\n Id = \"m2EmptyCEWP\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with link\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploContentEditorWebpartWithUrlLink()\r\n {\r\n var htmlContent = new ModuleFileDefinition\r\n {\r\n FileName = \"m2-cewp-content.html\",\r\n Content = Encoding.UTF8.GetBytes(\"M2 is everything you need to deploy stuff to Sharepoint\"),\r\n Overwrite = true,\r\n };\r\n\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with URL link\",\r\n Id = \"m2ContentLinkCEWP\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n ContentLink = UrlUtility.CombineUrl(new string[]{\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n htmlContent.FileName})\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddModuleFile(htmlContent);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CEWP with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployContentEditorWebpartWithContent()\r\n {\r\n var cewp = new ContentEditorWebPartDefinition\r\n {\r\n Title = \"Content Editor Webpart with content\",\r\n Id = \"m2ContentCEWP\",\r\n ZoneIndex = 30,\r\n ZoneId = \"Main\",\r\n Content = \"Content Editor web part inplace content.\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 CEWP provision\",\r\n FileName = \"cewp-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddContentEditorWebPart(cewp);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentEditorWebPartDefinitionTests\r\n ContentEditorWebPartDefinitionTestsClass\r\n \r\n ClassContentEditorWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentEditorWebPartDefinitionTests\r\n 0\r\n ContentEditorWebPartDefinitionTests.cs\r\n ContentEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentEditorWebPartDefinitionTests.cs\r\n"); } public static class ContentTypeDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add item content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(listContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleListContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleListContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add document content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var documentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(documentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleDocumentContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleDocumentContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add document set content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var documentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(documentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleDocumentSetContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleDocumentSetContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add several content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleContentTypes\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleContentTypes\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add content type with fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleContentTypesWithFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleContentTypesWithFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add parent-child content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar childDocumentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeployHierarhicalContentTypes\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeployHierarhicalContentTypes\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n ContentTypeDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentTypeDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document set content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add several content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type with fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add parent-child content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentTypeDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document set content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add several content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type with fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add parent-child content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n ContentTypeDefinitionTestsClass\r\n \r\n ClassContentTypeDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add item content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(listContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleListContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleListContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add document content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var documentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(documentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleDocumentContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleDocumentContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add document set content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var documentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(documentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleDocumentSetContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleDocumentSetContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add several content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleContentTypes\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleContentTypes\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add content type with fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleContentTypesWithFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleContentTypesWithFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add parent-child content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar childDocumentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeployHierarhicalContentTypes\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeployHierarhicalContentTypes\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n ContentTypeDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentTypeDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document set content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add several content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type with fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add parent-child content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentTypeDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document set content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add several content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type with fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add parent-child content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n ContentTypeDefinitionTestsClass\r\n \r\n ClassContentTypeDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleListContentType = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add item content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(listContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleListContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleListContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleDocumentContentType = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add document content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var documentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(documentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleDocumentContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleDocumentContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleDocumentSetContentType = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add document set content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var documentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(documentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleDocumentSetContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleDocumentSetContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleContentTypes = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add several content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleContentTypes\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleContentTypes\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleContentTypesWithFields = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add content type with fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleContentTypesWithFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleContentTypesWithFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployHierarhicalContentTypes = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add parent-child content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar childDocumentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeployHierarhicalContentTypes\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeployHierarhicalContentTypes\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ContentTypeDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n ContentTypeDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentTypeDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document set content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add several content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type with fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add parent-child content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentTypeDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document set content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add several content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type with fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add parent-child content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n ContentTypeDefinitionTestsClass\r\n \r\n ClassContentTypeDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleListContentType = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add item content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(listContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleListContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleListContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleDocumentContentType = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add document content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var documentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(documentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleDocumentContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleDocumentContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleDocumentSetContentType = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add document set content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var documentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(documentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleDocumentSetContentType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleDocumentSetContentType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleContentTypes = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add several content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleContentTypes\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleContentTypes\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleContentTypesWithFields = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add content type with fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeploySimpleContentTypesWithFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeploySimpleContentTypesWithFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployHierarhicalContentTypes = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add parent-child content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar childDocumentContentType = new ContentTypeDefinition\r\n{\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n CanDeployHierarhicalContentTypes\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests.CanDeployHierarhicalContentTypes\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ContentTypeDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Web Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n ContentTypeDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentTypeDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document set content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add several content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type with fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add parent-child content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentTypeDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListContentType()\r\n {\r\n var listContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom list item\",\r\n Id = new Guid(\"79658c1e-3096-4c44-bd55-4228d01a5b97\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(listContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document\",\r\n Id = new Guid(\"008e7c50-a271-4fcd-9f01-f18daad5bd7e\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add document set content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDocumentSetContentType()\r\n {\r\n var documentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Custom document set\",\r\n Id = new Guid(\"AAC93B98-F776-4D5C-9E6E-66F2DC45A467\"),\r\n ParentContentTypeId = BuiltInContentTypeId.DocumentSet_Correct,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(documentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add several content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypes()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(DocContentTypes.CustomerAccount)\r\n .AddContentType(DocContentTypes.CustomerDocument);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type with fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentTypesWithFields()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(DocFields.Clients.ClientCredit)\r\n .AddField(DocFields.Clients.ClientDebit)\r\n .AddField(DocFields.Clients.ClientDescription)\r\n .AddField(DocFields.Clients.ClientNumber)\r\n .AddField(DocFields.Clients.ClientWebSite)\r\n\r\n .AddContentType(DocContentTypes.CustomerAccount, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientCredit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDebit)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientWebSite);\r\n })\r\n .AddContentType(DocContentTypes.CustomerDocument, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientDescription)\r\n .AddContentTypeFieldLink(DocFields.Clients.ClientNumber);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add parent-child content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarhicalContentTypes()\r\n {\r\n var rootDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A root document\",\r\n Id = new Guid(\"b0ec3794-8bf3-49ed-b8d1-24a4df5ac75b\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var childDocumentContentType = new ContentTypeDefinition\r\n {\r\n Name = \"A child document\",\r\n Id = new Guid(\"84ab43ee-1f9d-4436-a9de-868bd7a36400\"),\r\n // use GetContentTypeId() to get the content type ID and refer as a parent ID\r\n ParentContentTypeId = rootDocumentContentType.GetContentTypeId(),\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(rootDocumentContentType)\r\n .AddContentType(childDocumentContentType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeDefinitionTests\r\n ContentTypeDefinitionTestsClass\r\n \r\n ClassContentTypeDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeDefinitionTests\r\n 0\r\n ContentTypeDefinitionTests.cs\r\n ContentTypeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeDefinitionTests.cs\r\n"); } public static class ContentTypeFieldLinkDefinitionTests @@ -705,31 +739,33 @@ public static class ContentTypeFieldLinkDefinitionTests public static class ContentTypeLinkDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add content type to lists\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContentTypeLinkDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeLinkDefinitionTests\r\n CanDeploySimpleContentTypeLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests.CanDeploySimpleContentTypeLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests\r\n 0\r\n ContentTypeLinkDefinitionTests.cs\r\n ContentTypeLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeLinkDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ContentTypeLinkDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n public class ContentTypeLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to lists\",\r\n Description = \"\"\r\n )]\r\n \r\n public void CanDeploySimpleContentTypeLinkDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n public class ContentTypeLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to lists\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeploySimpleContentTypeLinkDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeLinkDefinitionTests\r\n ContentTypeLinkDefinitionTestsClass\r\n \r\n ClassContentTypeLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests\r\n 0\r\n ContentTypeLinkDefinitionTests.cs\r\n ContentTypeLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeLinkDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add content type to list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListItemContentTypeLinkDefinition()\r\n {\r\n var customerInfoContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Information\",\r\n Id = new Guid(\"e33acc19-6d61-43b0-a313-4177065cd7c3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Information\",\r\n Description = \"A list to store customer information.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"CustomerInfo\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerInfoContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customerInfoContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Customer Information\",\r\n Id = new Guid(\"e33acc19-6d61-43b0-a313-4177065cd7c3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar customerInfoList = new ListDefinition\r\n{\r\n Title = \"Customer Information\",\r\n Description = \"A list to store customer information.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"CustomerInfo\",\r\n ContentTypesEnabled = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerInfoContentType);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeLinkDefinitionTests\r\n CanDeployListItemContentTypeLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests.CanDeployListItemContentTypeLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests\r\n 0\r\n ContentTypeLinkDefinitionTests.cs\r\n ContentTypeLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeLinkDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add content type to document library\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployDocumentItemContentTypeLinkDefinition()\r\n {\r\n var customerReportContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Report\",\r\n Id = new Guid(\"1836765c-6264-479b-a95b-a553a3d14ba3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Reports\",\r\n Description = \"A list to store customer reports.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerReports\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerReportContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customerReportContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Customer Report\",\r\n Id = new Guid(\"1836765c-6264-479b-a95b-a553a3d14ba3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar customerInfoList = new ListDefinition\r\n{\r\n Title = \"Customer Reports\",\r\n Description = \"A list to store customer reports.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerReports\",\r\n ContentTypesEnabled = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerReportContentType);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeLinkDefinitionTests\r\n CanDeployDocumentItemContentTypeLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests.CanDeployDocumentItemContentTypeLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests\r\n 0\r\n ContentTypeLinkDefinitionTests.cs\r\n ContentTypeLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeLinkDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n ContentTypeLinkDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentTypeLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListItemContentTypeLinkDefinition()\r\n {\r\n var customerInfoContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Information\",\r\n Id = new Guid(\"e33acc19-6d61-43b0-a313-4177065cd7c3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Information\",\r\n Description = \"A list to store customer information.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"CustomerInfo\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerInfoContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to document library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployDocumentItemContentTypeLinkDefinition()\r\n {\r\n var customerReportContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Report\",\r\n Id = new Guid(\"1836765c-6264-479b-a95b-a553a3d14ba3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Reports\",\r\n Description = \"A list to store customer reports.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerReports\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerReportContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentTypeLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListItemContentTypeLinkDefinition()\r\n {\r\n var customerInfoContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Information\",\r\n Id = new Guid(\"e33acc19-6d61-43b0-a313-4177065cd7c3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Information\",\r\n Description = \"A list to store customer information.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"CustomerInfo\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerInfoContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to document library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployDocumentItemContentTypeLinkDefinition()\r\n {\r\n var customerReportContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Report\",\r\n Id = new Guid(\"1836765c-6264-479b-a95b-a553a3d14ba3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Reports\",\r\n Description = \"A list to store customer reports.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerReports\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerReportContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeLinkDefinitionTests\r\n ContentTypeLinkDefinitionTestsClass\r\n \r\n ClassContentTypeLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests\r\n 0\r\n ContentTypeLinkDefinitionTests.cs\r\n ContentTypeLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeLinkDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleContentTypeLinkDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add content type to lists\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContentTypeLinkDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeLinkDefinitionTests\r\n CanDeploySimpleContentTypeLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests.CanDeploySimpleContentTypeLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests\r\n 0\r\n ContentTypeLinkDefinitionTests.cs\r\n ContentTypeLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeLinkDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ContentTypeLinkDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ContentTypeLinkDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n public class ContentTypeLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to lists\",\r\n Description = \"\"\r\n )]\r\n \r\n public void CanDeploySimpleContentTypeLinkDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n public class ContentTypeLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to lists\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeploySimpleContentTypeLinkDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeLinkDefinitionTests\r\n ContentTypeLinkDefinitionTestsClass\r\n \r\n ClassContentTypeLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests\r\n 0\r\n ContentTypeLinkDefinitionTests.cs\r\n ContentTypeLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeLinkDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployListItemContentTypeLinkDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add content type to list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListItemContentTypeLinkDefinition()\r\n {\r\n var customerInfoContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Information\",\r\n Id = new Guid(\"e33acc19-6d61-43b0-a313-4177065cd7c3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Information\",\r\n Description = \"A list to store customer information.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"CustomerInfo\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerInfoContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customerInfoContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Customer Information\",\r\n Id = new Guid(\"e33acc19-6d61-43b0-a313-4177065cd7c3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar customerInfoList = new ListDefinition\r\n{\r\n Title = \"Customer Information\",\r\n Description = \"A list to store customer information.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"CustomerInfo\",\r\n ContentTypesEnabled = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerInfoContentType);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeLinkDefinitionTests\r\n CanDeployListItemContentTypeLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests.CanDeployListItemContentTypeLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests\r\n 0\r\n ContentTypeLinkDefinitionTests.cs\r\n ContentTypeLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeLinkDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployDocumentItemContentTypeLinkDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Add content type to document library\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployDocumentItemContentTypeLinkDefinition()\r\n {\r\n var customerReportContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Report\",\r\n Id = new Guid(\"1836765c-6264-479b-a95b-a553a3d14ba3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Reports\",\r\n Description = \"A list to store customer reports.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerReports\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerReportContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customerReportContentType = new ContentTypeDefinition\r\n{\r\n Name = \"Customer Report\",\r\n Id = new Guid(\"1836765c-6264-479b-a95b-a553a3d14ba3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar customerInfoList = new ListDefinition\r\n{\r\n Title = \"Customer Reports\",\r\n Description = \"A list to store customer reports.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerReports\",\r\n ContentTypesEnabled = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerReportContentType);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeLinkDefinitionTests\r\n CanDeployDocumentItemContentTypeLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests.CanDeployDocumentItemContentTypeLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests\r\n 0\r\n ContentTypeLinkDefinitionTests.cs\r\n ContentTypeLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeLinkDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ContentTypeLinkDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n ContentTypeLinkDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentTypeLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListItemContentTypeLinkDefinition()\r\n {\r\n var customerInfoContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Information\",\r\n Id = new Guid(\"e33acc19-6d61-43b0-a313-4177065cd7c3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Information\",\r\n Description = \"A list to store customer information.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"CustomerInfo\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerInfoContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to document library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployDocumentItemContentTypeLinkDefinition()\r\n {\r\n var customerReportContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Report\",\r\n Id = new Guid(\"1836765c-6264-479b-a95b-a553a3d14ba3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Reports\",\r\n Description = \"A list to store customer reports.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerReports\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerReportContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentTypeLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListItemContentTypeLinkDefinition()\r\n {\r\n var customerInfoContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Information\",\r\n Id = new Guid(\"e33acc19-6d61-43b0-a313-4177065cd7c3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Information\",\r\n Description = \"A list to store customer information.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"CustomerInfo\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerInfoContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentTypeLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add content type to document library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployDocumentItemContentTypeLinkDefinition()\r\n {\r\n var customerReportContentType = new ContentTypeDefinition\r\n {\r\n Name = \"Customer Report\",\r\n Id = new Guid(\"1836765c-6264-479b-a95b-a553a3d14ba3\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Document,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var customerInfoList = new ListDefinition\r\n {\r\n Title = \"Customer Reports\",\r\n Description = \"A list to store customer reports.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerReports\",\r\n ContentTypesEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(customerInfoList, list =>\r\n {\r\n list.AddContentTypeLink(customerReportContentType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentTypeLinkDefinitionTests\r\n ContentTypeLinkDefinitionTestsClass\r\n \r\n ClassContentTypeLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentTypeLinkDefinitionTests\r\n 0\r\n ContentTypeLinkDefinitionTests.cs\r\n ContentTypeLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ContentTypeLinkDefinitionTests.cs\r\n"); } public static class CurrencyFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add currency field\r\n \r\n \r\n \r\n\r\n\r\n \r\n \r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CurrencyFieldDefinitionTests\r\n CanDeploySimpleCurrencyFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests.CanDeploySimpleCurrencyFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests\r\n 0\r\n CurrencyFieldDefinitionTests.cs\r\n CurrencyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CurrencyFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n CurrencyFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CurrencyFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CurrencyFieldDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add currency field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CurrencyFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CurrencyFieldDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add currency field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CurrencyFieldDefinitionTests\r\n CurrencyFieldDefinitionTestsClass\r\n \r\n ClassCurrencyFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests\r\n 0\r\n CurrencyFieldDefinitionTests.cs\r\n CurrencyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CurrencyFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add currency field\r\n \r\n \r\n \r\n\r\n\r\n \r\n \r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CurrencyFieldDefinitionTests\r\n CanDeploySimpleCurrencyFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests.CanDeploySimpleCurrencyFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests\r\n 0\r\n CurrencyFieldDefinitionTests.cs\r\n CurrencyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CurrencyFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n CurrencyFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CurrencyFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CurrencyFieldDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add currency field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CurrencyFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CurrencyFieldDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add currency field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CurrencyFieldDefinitionTests\r\n CurrencyFieldDefinitionTestsClass\r\n \r\n ClassCurrencyFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests\r\n 0\r\n CurrencyFieldDefinitionTests.cs\r\n CurrencyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CurrencyFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleCurrencyFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add currency field\r\n \r\n \r\n \r\n\r\n\r\n \r\n \r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CurrencyFieldDefinitionTests\r\n CanDeploySimpleCurrencyFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests.CanDeploySimpleCurrencyFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests\r\n 0\r\n CurrencyFieldDefinitionTests.cs\r\n CurrencyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CurrencyFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CurrencyFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n CurrencyFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CurrencyFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CurrencyFieldDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add currency field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CurrencyFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CurrencyFieldDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add currency field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CurrencyFieldDefinitionTests\r\n CurrencyFieldDefinitionTestsClass\r\n \r\n ClassCurrencyFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests\r\n 0\r\n CurrencyFieldDefinitionTests.cs\r\n CurrencyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CurrencyFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleCurrencyFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add currency field\r\n \r\n \r\n \r\n\r\n\r\n \r\n \r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CurrencyFieldDefinitionTests\r\n CanDeploySimpleCurrencyFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests.CanDeploySimpleCurrencyFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests\r\n 0\r\n CurrencyFieldDefinitionTests.cs\r\n CurrencyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CurrencyFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CurrencyFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n CurrencyFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CurrencyFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CurrencyFieldDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add currency field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CurrencyFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CurrencyFieldDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add currency field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCurrencyFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CurrencyFieldDefinitionTests\r\n CurrencyFieldDefinitionTestsClass\r\n \r\n ClassCurrencyFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CurrencyFieldDefinitionTests\r\n 0\r\n CurrencyFieldDefinitionTests.cs\r\n CurrencyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\CurrencyFieldDefinitionTests.cs\r\n"); } public static class DateTimeFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add datetime field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DateTimeFieldDefinitionTests\r\n CanDeploySimpleDateTimeFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests.CanDeploySimpleDateTimeFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests\r\n 0\r\n DateTimeFieldDefinitionTests.cs\r\n DateTimeFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DateTimeFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n DateTimeFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class DateTimeFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DateTimeFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add datetime field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class DateTimeFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DateTimeFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add datetime field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DateTimeFieldDefinitionTests\r\n DateTimeFieldDefinitionTestsClass\r\n \r\n ClassDateTimeFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests\r\n 0\r\n DateTimeFieldDefinitionTests.cs\r\n DateTimeFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DateTimeFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add datetime field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DateTimeFieldDefinitionTests\r\n CanDeploySimpleDateTimeFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests.CanDeploySimpleDateTimeFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests\r\n 0\r\n DateTimeFieldDefinitionTests.cs\r\n DateTimeFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DateTimeFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n DateTimeFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class DateTimeFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DateTimeFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add datetime field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class DateTimeFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DateTimeFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add datetime field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DateTimeFieldDefinitionTests\r\n DateTimeFieldDefinitionTestsClass\r\n \r\n ClassDateTimeFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests\r\n 0\r\n DateTimeFieldDefinitionTests.cs\r\n DateTimeFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DateTimeFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleDateTimeFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add datetime field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DateTimeFieldDefinitionTests\r\n CanDeploySimpleDateTimeFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests.CanDeploySimpleDateTimeFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests\r\n 0\r\n DateTimeFieldDefinitionTests.cs\r\n DateTimeFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DateTimeFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample DateTimeFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n DateTimeFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class DateTimeFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DateTimeFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add datetime field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class DateTimeFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DateTimeFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add datetime field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DateTimeFieldDefinitionTests\r\n DateTimeFieldDefinitionTestsClass\r\n \r\n ClassDateTimeFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests\r\n 0\r\n DateTimeFieldDefinitionTests.cs\r\n DateTimeFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DateTimeFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleDateTimeFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add datetime field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DateTimeFieldDefinitionTests\r\n CanDeploySimpleDateTimeFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests.CanDeploySimpleDateTimeFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests\r\n 0\r\n DateTimeFieldDefinitionTests.cs\r\n DateTimeFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DateTimeFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample DateTimeFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n DateTimeFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class DateTimeFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DateTimeFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add datetime field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class DateTimeFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DateTimeFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add datetime field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDateTimeFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DateTimeFieldDefinitionTests\r\n DateTimeFieldDefinitionTestsClass\r\n \r\n ClassDateTimeFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DateTimeFieldDefinitionTests\r\n 0\r\n DateTimeFieldDefinitionTests.cs\r\n DateTimeFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DateTimeFieldDefinitionTests.cs\r\n"); } public static class DeleteWebPartsDefinitionTests @@ -745,11 +781,11 @@ public static class DeleteWebPartsDefinitionTests public static class DiagnosticsServiceBaseDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add diagnostic service\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DiagnosticsServiceBaseDefinitionTests\r\n CanDeploySimpleDiagnosticsServiceBaseDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests.CanDeploySimpleDiagnosticsServiceBaseDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests\r\n 0\r\n DiagnosticsServiceBaseDefinitionTests.cs\r\n DiagnosticsServiceBaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DiagnosticsServiceBaseDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n DiagnosticsServiceBaseDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class DiagnosticsServiceBaseDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DiagnosticsServiceBaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add diagnostic service\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class DiagnosticsServiceBaseDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DiagnosticsServiceBaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add diagnostic service\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DiagnosticsServiceBaseDefinitionTests\r\n DiagnosticsServiceBaseDefinitionTestsClass\r\n \r\n ClassDiagnosticsServiceBaseDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests\r\n 0\r\n DiagnosticsServiceBaseDefinitionTests.cs\r\n DiagnosticsServiceBaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DiagnosticsServiceBaseDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add diagnostic service\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DiagnosticsServiceBaseDefinitionTests\r\n CanDeploySimpleDiagnosticsServiceBaseDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests.CanDeploySimpleDiagnosticsServiceBaseDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests\r\n 0\r\n DiagnosticsServiceBaseDefinitionTests.cs\r\n DiagnosticsServiceBaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DiagnosticsServiceBaseDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n DiagnosticsServiceBaseDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class DiagnosticsServiceBaseDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DiagnosticsServiceBaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add diagnostic service\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class DiagnosticsServiceBaseDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DiagnosticsServiceBaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add diagnostic service\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DiagnosticsServiceBaseDefinitionTests\r\n DiagnosticsServiceBaseDefinitionTestsClass\r\n \r\n ClassDiagnosticsServiceBaseDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests\r\n 0\r\n DiagnosticsServiceBaseDefinitionTests.cs\r\n DiagnosticsServiceBaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DiagnosticsServiceBaseDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleDiagnosticsServiceBaseDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add diagnostic service\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DiagnosticsServiceBaseDefinitionTests\r\n CanDeploySimpleDiagnosticsServiceBaseDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests.CanDeploySimpleDiagnosticsServiceBaseDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests\r\n 0\r\n DiagnosticsServiceBaseDefinitionTests.cs\r\n DiagnosticsServiceBaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DiagnosticsServiceBaseDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample DiagnosticsServiceBaseDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n DiagnosticsServiceBaseDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class DiagnosticsServiceBaseDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DiagnosticsServiceBaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add diagnostic service\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class DiagnosticsServiceBaseDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DiagnosticsServiceBaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add diagnostic service\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DiagnosticsServiceBaseDefinitionTests\r\n DiagnosticsServiceBaseDefinitionTestsClass\r\n \r\n ClassDiagnosticsServiceBaseDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests\r\n 0\r\n DiagnosticsServiceBaseDefinitionTests.cs\r\n DiagnosticsServiceBaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DiagnosticsServiceBaseDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleDiagnosticsServiceBaseDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add diagnostic service\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DiagnosticsServiceBaseDefinitionTests\r\n CanDeploySimpleDiagnosticsServiceBaseDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests.CanDeploySimpleDiagnosticsServiceBaseDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests\r\n 0\r\n DiagnosticsServiceBaseDefinitionTests.cs\r\n DiagnosticsServiceBaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DiagnosticsServiceBaseDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample DiagnosticsServiceBaseDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n DiagnosticsServiceBaseDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class DiagnosticsServiceBaseDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DiagnosticsServiceBaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add diagnostic service\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class DiagnosticsServiceBaseDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.DiagnosticsServiceBaseDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add diagnostic service\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleDiagnosticsServiceBaseDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n DiagnosticsServiceBaseDefinitionTests\r\n DiagnosticsServiceBaseDefinitionTestsClass\r\n \r\n ClassDiagnosticsServiceBaseDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.DiagnosticsServiceBaseDefinitionTests\r\n 0\r\n DiagnosticsServiceBaseDefinitionTests.cs\r\n DiagnosticsServiceBaseDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\DiagnosticsServiceBaseDefinitionTests.cs\r\n"); } public static class DocumentParserDefinitionTests @@ -781,89 +817,89 @@ public static class EventReceiverDefinitionTests public static class FarmDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add farm feature\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n{\r\n f.Enable = true;\r\n});\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm.AddFarmFeature(farmFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmDefinitionTests\r\n CanDeploySimpleFarmDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests.CanDeploySimpleFarmDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests\r\n 0\r\n FarmDefinitionTests.cs\r\n FarmDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n FarmDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FarmDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm feature\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FarmDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm feature\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmDefinitionTests\r\n FarmDefinitionTestsClass\r\n \r\n ClassFarmDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests\r\n 0\r\n FarmDefinitionTests.cs\r\n FarmDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add farm feature\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n{\r\n f.Enable = true;\r\n});\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm.AddFarmFeature(farmFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmDefinitionTests\r\n CanDeploySimpleFarmDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests.CanDeploySimpleFarmDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests\r\n 0\r\n FarmDefinitionTests.cs\r\n FarmDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n FarmDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FarmDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm feature\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FarmDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm feature\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmDefinitionTests\r\n FarmDefinitionTestsClass\r\n \r\n ClassFarmDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests\r\n 0\r\n FarmDefinitionTests.cs\r\n FarmDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleFarmDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add farm feature\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n{\r\n f.Enable = true;\r\n});\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm.AddFarmFeature(farmFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmDefinitionTests\r\n CanDeploySimpleFarmDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests.CanDeploySimpleFarmDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests\r\n 0\r\n FarmDefinitionTests.cs\r\n FarmDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample FarmDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n FarmDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FarmDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm feature\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FarmDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm feature\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmDefinitionTests\r\n FarmDefinitionTestsClass\r\n \r\n ClassFarmDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests\r\n 0\r\n FarmDefinitionTests.cs\r\n FarmDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleFarmDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add farm feature\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n{\r\n f.Enable = true;\r\n});\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm.AddFarmFeature(farmFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmDefinitionTests\r\n CanDeploySimpleFarmDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests.CanDeploySimpleFarmDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests\r\n 0\r\n FarmDefinitionTests.cs\r\n FarmDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample FarmDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n FarmDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FarmDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm feature\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FarmDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm feature\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmDefinition()\r\n {\r\n var farmFeature = BuiltInFarmFeatures.SiteMailboxes.Inherit(f =>\r\n {\r\n f.Enable = true;\r\n });\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmFeature(farmFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmDefinitionTests\r\n FarmDefinitionTestsClass\r\n \r\n ClassFarmDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmDefinitionTests\r\n 0\r\n FarmDefinitionTests.cs\r\n FarmDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmDefinitionTests.cs\r\n"); } public static class FarmSolutionDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add farm solution\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var solutionDef = new FarmSolutionDefinition\r\n{\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n};\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm.AddFarmSolution(solutionDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmSolutionDefinitionTests\r\n CanDeploySimpleFarmSolutionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests.CanDeploySimpleFarmSolutionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests\r\n 0\r\n FarmSolutionDefinitionTests.cs\r\n FarmSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmSolutionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n FarmSolutionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FarmSolutionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FarmSolutionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmSolutionDefinitionTests\r\n FarmSolutionDefinitionTestsClass\r\n \r\n ClassFarmSolutionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests\r\n 0\r\n FarmSolutionDefinitionTests.cs\r\n FarmSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmSolutionDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add farm solution\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var solutionDef = new FarmSolutionDefinition\r\n{\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n};\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm.AddFarmSolution(solutionDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmSolutionDefinitionTests\r\n CanDeploySimpleFarmSolutionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests.CanDeploySimpleFarmSolutionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests\r\n 0\r\n FarmSolutionDefinitionTests.cs\r\n FarmSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmSolutionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n FarmSolutionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FarmSolutionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FarmSolutionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmSolutionDefinitionTests\r\n FarmSolutionDefinitionTestsClass\r\n \r\n ClassFarmSolutionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests\r\n 0\r\n FarmSolutionDefinitionTests.cs\r\n FarmSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmSolutionDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleFarmSolutionDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add farm solution\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var solutionDef = new FarmSolutionDefinition\r\n{\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n};\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm.AddFarmSolution(solutionDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmSolutionDefinitionTests\r\n CanDeploySimpleFarmSolutionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests.CanDeploySimpleFarmSolutionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests\r\n 0\r\n FarmSolutionDefinitionTests.cs\r\n FarmSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmSolutionDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample FarmSolutionDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n FarmSolutionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FarmSolutionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FarmSolutionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmSolutionDefinitionTests\r\n FarmSolutionDefinitionTestsClass\r\n \r\n ClassFarmSolutionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests\r\n 0\r\n FarmSolutionDefinitionTests.cs\r\n FarmSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmSolutionDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleFarmSolutionDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add farm solution\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var solutionDef = new FarmSolutionDefinition\r\n{\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n};\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm.AddFarmSolution(solutionDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmSolutionDefinitionTests\r\n CanDeploySimpleFarmSolutionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests.CanDeploySimpleFarmSolutionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests\r\n 0\r\n FarmSolutionDefinitionTests.cs\r\n FarmSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmSolutionDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample FarmSolutionDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n FarmSolutionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FarmSolutionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FarmSolutionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FarmSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add farm solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFarmSolutionDefinition()\r\n {\r\n var solutionDef = new FarmSolutionDefinition\r\n {\r\n FileName = \"your-solution-file.wsp\",\r\n SolutionId = new Guid(\"your-solution-id\"),\r\n Content = File.ReadAllBytes(\"path-to-your-solution-or-byte-array\")\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm.AddFarmSolution(solutionDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FarmSolutionDefinitionTests\r\n FarmSolutionDefinitionTestsClass\r\n \r\n ClassFarmSolutionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FarmSolutionDefinitionTests\r\n 0\r\n FarmSolutionDefinitionTests.cs\r\n FarmSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FarmSolutionDefinitionTests.cs\r\n"); } public static class FeatureDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate OOTB site features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateOOTBSiteFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateOOTBSiteFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate OOTB web features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateOOTBWebFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateOOTBWebFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Disable OOTB web features\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanDeactivateOOTBWebFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanDeactivateOOTBWebFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate custom web features\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var myCustomerFeature = new FeatureDefinition\r\n{\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateCustomWebFeature\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateCustomWebFeature\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Disable custom web features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var myCustomerFeature = new FeatureDefinition\r\n{\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanDeactivateCustomWebFeature\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanDeactivateCustomWebFeature\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Inherit OOTB features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n{\r\n def.Enable = true;\r\n});\r\n\r\nvar disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n{\r\n def.Enable = false;\r\n});\r\n\r\n// enable MDS\r\nvar enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n});\r\n\r\nDeployModel(enableMdsModel);\r\n\r\n// disable MDS\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n OOTBFeatureInheritance\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.OOTBFeatureInheritance\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n Features\r\n \r\n \r\n \r\n FeatureDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FeatureDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB site features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n \r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Disable OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Activate custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Disable custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Inherit OOTB features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FeatureDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB site features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Disable OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Activate custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Disable custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Inherit OOTB features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n FeatureDefinitionTestsClass\r\n \r\n ClassFeatureDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate OOTB site features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateOOTBSiteFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateOOTBSiteFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate OOTB web features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateOOTBWebFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateOOTBWebFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Disable OOTB web features\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanDeactivateOOTBWebFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanDeactivateOOTBWebFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate custom web features\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var myCustomerFeature = new FeatureDefinition\r\n{\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateCustomWebFeature\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateCustomWebFeature\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Disable custom web features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var myCustomerFeature = new FeatureDefinition\r\n{\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanDeactivateCustomWebFeature\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanDeactivateCustomWebFeature\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Inherit OOTB features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n{\r\n def.Enable = true;\r\n});\r\n\r\nvar disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n{\r\n def.Enable = false;\r\n});\r\n\r\n// enable MDS\r\nvar enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n});\r\n\r\nDeployModel(enableMdsModel);\r\n\r\n// disable MDS\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n OOTBFeatureInheritance\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.OOTBFeatureInheritance\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n Features\r\n \r\n \r\n \r\n FeatureDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FeatureDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB site features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n \r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Disable OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Activate custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Disable custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Inherit OOTB features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FeatureDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB site features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Disable OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Activate custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Disable custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Inherit OOTB features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n FeatureDefinitionTestsClass\r\n \r\n ClassFeatureDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanActivateOOTBSiteFeatures = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate OOTB site features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateOOTBSiteFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateOOTBSiteFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanActivateOOTBWebFeatures = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate OOTB web features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateOOTBWebFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateOOTBWebFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeactivateOOTBWebFeatures = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Disable OOTB web features\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanDeactivateOOTBWebFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanDeactivateOOTBWebFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanActivateCustomWebFeature = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate custom web features\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var myCustomerFeature = new FeatureDefinition\r\n{\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateCustomWebFeature\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateCustomWebFeature\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeactivateCustomWebFeature = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Disable custom web features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var myCustomerFeature = new FeatureDefinition\r\n{\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanDeactivateCustomWebFeature\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanDeactivateCustomWebFeature\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample OOTBFeatureInheritance = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Inherit OOTB features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n{\r\n def.Enable = true;\r\n});\r\n\r\nvar disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n{\r\n def.Enable = false;\r\n});\r\n\r\n// enable MDS\r\nvar enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n});\r\n\r\nDeployModel(enableMdsModel);\r\n\r\n// disable MDS\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n OOTBFeatureInheritance\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.OOTBFeatureInheritance\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample FeatureDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n Features\r\n \r\n \r\n \r\n FeatureDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FeatureDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB site features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n \r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Disable OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Activate custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Disable custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Inherit OOTB features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FeatureDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB site features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Disable OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Activate custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Disable custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Inherit OOTB features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n FeatureDefinitionTestsClass\r\n \r\n ClassFeatureDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanActivateOOTBSiteFeatures = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate OOTB site features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateOOTBSiteFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateOOTBSiteFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanActivateOOTBWebFeatures = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate OOTB web features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateOOTBWebFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateOOTBWebFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeactivateOOTBWebFeatures = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Disable OOTB web features\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanDeactivateOOTBWebFeatures\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanDeactivateOOTBWebFeatures\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanActivateCustomWebFeature = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Activate custom web features\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var myCustomerFeature = new FeatureDefinition\r\n{\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanActivateCustomWebFeature\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanActivateCustomWebFeature\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeactivateCustomWebFeature = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Disable custom web features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var myCustomerFeature = new FeatureDefinition\r\n{\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n CanDeactivateCustomWebFeature\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.CanDeactivateCustomWebFeature\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample OOTBFeatureInheritance = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n \r\n \r\n \r\n Inherit OOTB features\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n{\r\n def.Enable = true;\r\n});\r\n\r\nvar disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n{\r\n def.Enable = false;\r\n});\r\n\r\n// enable MDS\r\nvar enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n});\r\n\r\nDeployModel(enableMdsModel);\r\n\r\n// disable MDS\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n OOTBFeatureInheritance\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests.OOTBFeatureInheritance\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample FeatureDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n Site Collection Model\r\n Farm Model\r\n Web Application Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Features\r\n Features\r\n \r\n \r\n \r\n FeatureDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class FeatureDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB site features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n \r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Disable OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Activate custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Disable custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Inherit OOTB features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FeatureDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB site features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanActivateOOTBSiteFeatures()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSiteFeature(DocSiteFeatures.SitePublisingInfrastructure)\r\n .AddSiteFeature(DocSiteFeatures.DocumentSets);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Activate OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.WebPublishingInfrastructure)\r\n .AddWebFeature(DocWebFeatures.MetadataNavigationAndFiltering)\r\n .AddWebFeature(DocWebFeatures.MDS);\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Disable OOTB web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateOOTBWebFeatures()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(DocWebFeatures.Disable.MDS);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n [SampleMetadata(Title = \"Activate custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanActivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = true,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Disable custom web features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeactivateCustomWebFeature()\r\n {\r\n var myCustomerFeature = new FeatureDefinition\r\n {\r\n Enable = false,\r\n Id = new Guid(\"87294C72-F260-42f3-A41B-981A2FFCE37A\"),\r\n Scope = FeatureDefinitionScope.Web\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(myCustomerFeature);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FeatureDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Inherit OOTB features\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void OOTBFeatureInheritance()\r\n {\r\n var enableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = true;\r\n });\r\n\r\n var disableMinimalDownloadStrategy = BuiltInWebFeatures.MinimalDownloadStrategy.Inherit(def =>\r\n {\r\n def.Enable = false;\r\n });\r\n\r\n // enable MDS\r\n var enableMdsModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(enableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(enableMdsModel);\r\n\r\n // disable MDS\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(disableMinimalDownloadStrategy);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FeatureDefinitionTests\r\n FeatureDefinitionTestsClass\r\n \r\n ClassFeatureDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FeatureDefinitionTests\r\n 0\r\n FeatureDefinitionTests.cs\r\n FeatureDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FeatureDefinitionTests.cs\r\n"); } public static class FieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add field to site\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\nvar customerRefererence = new FieldDefinition\r\n{\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar isAciveClient = new FieldDefinition\r\n{\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar additionalInformation = new FieldDefinition\r\n{\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n};\r\n\r\nvar customerBalance = new FieldDefinition\r\n{\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeploySiteFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeploySiteFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add field to web\r\n \r\n \r\n \r\n\r\n \r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var textField = new FieldDefinition\r\n{\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar booleanField = new FieldDefinition\r\n{\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar listWithFields = new ListDefinition\r\n{\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeployWebFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeployWebFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add field to list\r\n \r\n \r\n \r\n\r\n \r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var textField = new FieldDefinition\r\n{\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar booleanField = new FieldDefinition\r\n{\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar listWithFields = new ListDefinition\r\n{\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeployListFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeployListFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n FieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n public class FieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region by scope\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to site\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to web\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to list\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n\r\n\r\n #region typed fields\r\n\r\n\r\n #endregion\r\n }\r\n public class FieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region by scope\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to site\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to web\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to list\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n\r\n\r\n #region typed fields\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n FieldDefinitionTestsClass\r\n \r\n ClassFieldDefinitionTestsClass\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add field to site\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\nvar customerRefererence = new FieldDefinition\r\n{\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar isAciveClient = new FieldDefinition\r\n{\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar additionalInformation = new FieldDefinition\r\n{\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n};\r\n\r\nvar customerBalance = new FieldDefinition\r\n{\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeploySiteFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeploySiteFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add field to web\r\n \r\n \r\n \r\n\r\n \r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var textField = new FieldDefinition\r\n{\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar booleanField = new FieldDefinition\r\n{\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar listWithFields = new ListDefinition\r\n{\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeployWebFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeployWebFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add field to list\r\n \r\n \r\n \r\n\r\n \r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var textField = new FieldDefinition\r\n{\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar booleanField = new FieldDefinition\r\n{\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar listWithFields = new ListDefinition\r\n{\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeployListFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeployListFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n FieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n public class FieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region by scope\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to site\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to web\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to list\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n\r\n\r\n #region typed fields\r\n\r\n\r\n #endregion\r\n }\r\n public class FieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region by scope\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to site\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to web\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to list\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n\r\n\r\n #region typed fields\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n FieldDefinitionTestsClass\r\n \r\n ClassFieldDefinitionTestsClass\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySiteFields = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add field to site\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\nvar customerRefererence = new FieldDefinition\r\n{\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar isAciveClient = new FieldDefinition\r\n{\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar additionalInformation = new FieldDefinition\r\n{\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n};\r\n\r\nvar customerBalance = new FieldDefinition\r\n{\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeploySiteFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeploySiteFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebFields = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add field to web\r\n \r\n \r\n \r\n\r\n \r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var textField = new FieldDefinition\r\n{\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar booleanField = new FieldDefinition\r\n{\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar listWithFields = new ListDefinition\r\n{\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeployWebFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeployWebFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployListFields = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add field to list\r\n \r\n \r\n \r\n\r\n \r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var textField = new FieldDefinition\r\n{\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar booleanField = new FieldDefinition\r\n{\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar listWithFields = new ListDefinition\r\n{\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeployListFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeployListFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample FieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n FieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n public class FieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region by scope\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to site\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to web\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to list\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n\r\n\r\n #region typed fields\r\n\r\n\r\n #endregion\r\n }\r\n public class FieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region by scope\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to site\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to web\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to list\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n\r\n\r\n #region typed fields\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n FieldDefinitionTestsClass\r\n \r\n ClassFieldDefinitionTestsClass\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySiteFields = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add field to site\r\n \r\n \r\n \r\n\r\n \r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\nvar customerRefererence = new FieldDefinition\r\n{\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar isAciveClient = new FieldDefinition\r\n{\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar additionalInformation = new FieldDefinition\r\n{\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n};\r\n\r\nvar customerBalance = new FieldDefinition\r\n{\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeploySiteFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeploySiteFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebFields = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add field to web\r\n \r\n \r\n \r\n\r\n \r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var textField = new FieldDefinition\r\n{\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar booleanField = new FieldDefinition\r\n{\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar listWithFields = new ListDefinition\r\n{\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeployWebFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeployWebFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployListFields = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add field to list\r\n \r\n \r\n \r\n\r\n \r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var textField = new FieldDefinition\r\n{\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n};\r\n\r\nvar booleanField = new FieldDefinition\r\n{\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n};\r\n\r\nvar listWithFields = new ListDefinition\r\n{\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n CanDeployListFields\r\n \r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests.CanDeployListFields\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample FieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n FieldDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n public class FieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region by scope\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to site\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to web\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to list\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n\r\n\r\n #region typed fields\r\n\r\n\r\n #endregion\r\n }\r\n public class FieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region by scope\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to site\",\r\n Description = \"\"\r\n )]\r\n public void CanDeploySiteFields()\r\n {\r\n // use BuiltInFieldTypes class to refer to OOTB SharePoint fields\r\n\r\n var customerRefererence = new FieldDefinition\r\n {\r\n Title = \"Customer Reference\",\r\n InternalName = \"dcs_CustomerReference\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"D3B94B32-3F97-4B5B-99BE-95D17F83618B\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var isAciveClient = new FieldDefinition\r\n {\r\n Title = \"Is Active Customer\",\r\n InternalName = \"dcs_IsActiveCustomer\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"C846CA90-5EE0-4FDF-882B-6FB17625C6F9\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var additionalInformation = new FieldDefinition\r\n {\r\n Title = \"Customer Additional Information\",\r\n InternalName = \"dcs_CustomerAdditionalInfo\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"A5221F56-D4F4-4831-AF51-AA9776FA990D\"),\r\n FieldType = BuiltInFieldTypes.Note,\r\n };\r\n\r\n var customerBalance = new FieldDefinition\r\n {\r\n Title = \"Customer Balance\",\r\n InternalName = \"dcs_CustomerBalance\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"3C0A0358-BF74-4F79-855B-F85F5BF24028\"),\r\n FieldType = BuiltInFieldTypes.Number,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customerRefererence)\r\n .AddField(isAciveClient)\r\n .AddField(additionalInformation)\r\n .AddField(customerBalance);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to web\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployWebFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddField(textField);\r\n web.AddField(booleanField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add field to list\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeployListFields()\r\n {\r\n var textField = new FieldDefinition\r\n {\r\n Title = \"Simple text field\",\r\n InternalName = \"dcs_SimpleTextField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"c3afc5ee-c416-4a05-91b3-116de4a205de\"),\r\n FieldType = BuiltInFieldTypes.Text,\r\n };\r\n\r\n var booleanField = new FieldDefinition\r\n {\r\n Title = \"Simple boolean field\",\r\n InternalName = \"dcs_SimpleBooleanField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"1f0a5ba9-7b00-433d-8d93-dcfb4f87bfca\"),\r\n FieldType = BuiltInFieldTypes.Boolean,\r\n };\r\n\r\n var listWithFields = new ListDefinition\r\n {\r\n Title = \"List with fields\",\r\n Description = \"Custom list with list-scoped fields.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFields\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFields, list =>\r\n {\r\n list.AddField(textField);\r\n list.AddField(booleanField);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n\r\n\r\n #region typed fields\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions\r\n FieldDefinitionTests\r\n FieldDefinitionTestsClass\r\n \r\n ClassFieldDefinitionTestsClass\r\n SubPointSolutions.Docs.Content.SPMeta2.SharePoint_Foundation_Definitions.FieldDefinitionTests\r\n 0\r\n FieldDefinitionTests.cs\r\n FieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FieldDefinitionTests.cs\r\n"); } public static class FolderDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add folders\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var activeDocsFolder = new FolderDefinition\r\n{\r\n Name = \"Active documents\"\r\n};\r\n\r\nvar archiveFolder = new FolderDefinition\r\n{\r\n Name = \"Archive\"\r\n};\r\n\r\nvar listWithFolders = new ListDefinition\r\n{\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeploySimpleFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeploySimpleFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add folders to list\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeploySimpleFolderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeploySimpleFolderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add folder hierarchy to list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeployHierarchicalFolderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeployHierarchicalFolderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n FolderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class FolderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n [SampleMetadata(Title = \"Add folders to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder hierarchy to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FolderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n [SampleMetadata(Title = \"Add folders to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder hierarchy to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n FolderDefinitionTestsClass\r\n \r\n ClassFolderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add folders\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var activeDocsFolder = new FolderDefinition\r\n{\r\n Name = \"Active documents\"\r\n};\r\n\r\nvar archiveFolder = new FolderDefinition\r\n{\r\n Name = \"Archive\"\r\n};\r\n\r\nvar listWithFolders = new ListDefinition\r\n{\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeploySimpleFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeploySimpleFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add folders to list\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeploySimpleFolderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeploySimpleFolderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add folder hierarchy to list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeployHierarchicalFolderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeployHierarchicalFolderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n FolderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class FolderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n [SampleMetadata(Title = \"Add folders to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder hierarchy to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FolderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n [SampleMetadata(Title = \"Add folders to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder hierarchy to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n FolderDefinitionTestsClass\r\n \r\n ClassFolderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleFolders = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add folders\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var activeDocsFolder = new FolderDefinition\r\n{\r\n Name = \"Active documents\"\r\n};\r\n\r\nvar archiveFolder = new FolderDefinition\r\n{\r\n Name = \"Archive\"\r\n};\r\n\r\nvar listWithFolders = new ListDefinition\r\n{\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeploySimpleFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeploySimpleFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleFolderList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add folders to list\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeploySimpleFolderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeploySimpleFolderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployHierarchicalFolderList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add folder hierarchy to list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeployHierarchicalFolderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeployHierarchicalFolderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample FolderDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n FolderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class FolderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n [SampleMetadata(Title = \"Add folders to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder hierarchy to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FolderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n [SampleMetadata(Title = \"Add folders to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder hierarchy to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n FolderDefinitionTestsClass\r\n \r\n ClassFolderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleFolders = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add folders\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var activeDocsFolder = new FolderDefinition\r\n{\r\n Name = \"Active documents\"\r\n};\r\n\r\nvar archiveFolder = new FolderDefinition\r\n{\r\n Name = \"Archive\"\r\n};\r\n\r\nvar listWithFolders = new ListDefinition\r\n{\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeploySimpleFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeploySimpleFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleFolderList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add folders to list\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeploySimpleFolderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeploySimpleFolderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployHierarchicalFolderList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add folder hierarchy to list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n CanDeployHierarchicalFolderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests.CanDeployHierarchicalFolderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample FolderDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Folders\r\n Folders\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n FolderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class FolderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n [SampleMetadata(Title = \"Add folders to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder hierarchy to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class FolderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolders()\r\n {\r\n var activeDocsFolder = new FolderDefinition\r\n {\r\n Name = \"Active documents\"\r\n };\r\n\r\n var archiveFolder = new FolderDefinition\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var listWithFolders = new ListDefinition\r\n {\r\n Title = \"List with folders\",\r\n Description = \"Custom list with folders.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithFolders\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithFolders, list =>\r\n {\r\n list\r\n .AddFolder(activeDocsFolder)\r\n .AddFolder(archiveFolder);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n [SampleMetadata(Title = \"Add folders to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013)\r\n .AddFolder(DocFolders.Years.Year2014)\r\n .AddFolder(DocFolders.Years.Year2015);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FolderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder hierarchy to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployHierarchicalFolderList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(DocLists.GeneralReports, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.Years.Year2013, year2013 =>\r\n {\r\n year2013\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2014, year2014 =>\r\n {\r\n year2014\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n })\r\n .AddFolder(DocFolders.Years.Year2015, year2015 =>\r\n {\r\n year2015\r\n .AddFolder(DocFolders.Quarters.Q1)\r\n .AddFolder(DocFolders.Quarters.Q2)\r\n .AddFolder(DocFolders.Quarters.Q3)\r\n .AddFolder(DocFolders.Quarters.Q4);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n FolderDefinitionTests\r\n FolderDefinitionTestsClass\r\n \r\n ClassFolderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.FolderDefinitionTests\r\n 0\r\n FolderDefinitionTests.cs\r\n FolderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\FolderDefinitionTests.cs\r\n"); } public static class GuidFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add guid field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n GuidFieldDefinitionTests\r\n CanDeploySimpleGuidFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests.CanDeploySimpleGuidFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests\r\n 0\r\n GuidFieldDefinitionTests.cs\r\n GuidFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\GuidFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n GuidFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class GuidFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.GuidFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add guid field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class GuidFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.GuidFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add guid field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n GuidFieldDefinitionTests\r\n GuidFieldDefinitionTestsClass\r\n \r\n ClassGuidFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests\r\n 0\r\n GuidFieldDefinitionTests.cs\r\n GuidFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\GuidFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add guid field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n GuidFieldDefinitionTests\r\n CanDeploySimpleGuidFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests.CanDeploySimpleGuidFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests\r\n 0\r\n GuidFieldDefinitionTests.cs\r\n GuidFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\GuidFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n GuidFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class GuidFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.GuidFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add guid field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class GuidFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.GuidFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add guid field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n GuidFieldDefinitionTests\r\n GuidFieldDefinitionTestsClass\r\n \r\n ClassGuidFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests\r\n 0\r\n GuidFieldDefinitionTests.cs\r\n GuidFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\GuidFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleGuidFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add guid field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n GuidFieldDefinitionTests\r\n CanDeploySimpleGuidFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests.CanDeploySimpleGuidFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests\r\n 0\r\n GuidFieldDefinitionTests.cs\r\n GuidFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\GuidFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample GuidFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n GuidFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class GuidFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.GuidFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add guid field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class GuidFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.GuidFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add guid field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n GuidFieldDefinitionTests\r\n GuidFieldDefinitionTestsClass\r\n \r\n ClassGuidFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests\r\n 0\r\n GuidFieldDefinitionTests.cs\r\n GuidFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\GuidFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleGuidFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add guid field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n GuidFieldDefinitionTests\r\n CanDeploySimpleGuidFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests.CanDeploySimpleGuidFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests\r\n 0\r\n GuidFieldDefinitionTests.cs\r\n GuidFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\GuidFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample GuidFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n GuidFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class GuidFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.GuidFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add guid field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class GuidFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.GuidFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add guid field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleGuidFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n GuidFieldDefinitionTests\r\n GuidFieldDefinitionTestsClass\r\n \r\n ClassGuidFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.GuidFieldDefinitionTests\r\n 0\r\n GuidFieldDefinitionTests.cs\r\n GuidFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\GuidFieldDefinitionTests.cs\r\n"); } public static class HideContentTypeFieldLinksDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Reorder content type fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var hiddenNotesField = new NoteFieldDefinition\r\n{\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n};\r\n\r\nvar publicNotesField = new NoteFieldDefinition\r\n{\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n};\r\n\r\nvar hiddenNotesContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HideContentTypeFieldLinksDefinitionTests\r\n CanHideContentTypeFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests.CanHideContentTypeFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests\r\n 0\r\n HideContentTypeFieldLinksDefinitionTests.cs\r\n HideContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\HideContentTypeFieldLinksDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n HideContentTypeFieldLinksDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class HideContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HideContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class HideContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HideContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HideContentTypeFieldLinksDefinitionTests\r\n HideContentTypeFieldLinksDefinitionTestsClass\r\n \r\n ClassHideContentTypeFieldLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests\r\n 0\r\n HideContentTypeFieldLinksDefinitionTests.cs\r\n HideContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\HideContentTypeFieldLinksDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Reorder content type fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var hiddenNotesField = new NoteFieldDefinition\r\n{\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n};\r\n\r\nvar publicNotesField = new NoteFieldDefinition\r\n{\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n};\r\n\r\nvar hiddenNotesContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HideContentTypeFieldLinksDefinitionTests\r\n CanHideContentTypeFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests.CanHideContentTypeFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests\r\n 0\r\n HideContentTypeFieldLinksDefinitionTests.cs\r\n HideContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\HideContentTypeFieldLinksDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n HideContentTypeFieldLinksDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class HideContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HideContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class HideContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HideContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HideContentTypeFieldLinksDefinitionTests\r\n HideContentTypeFieldLinksDefinitionTestsClass\r\n \r\n ClassHideContentTypeFieldLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests\r\n 0\r\n HideContentTypeFieldLinksDefinitionTests.cs\r\n HideContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\HideContentTypeFieldLinksDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanHideContentTypeFields = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Reorder content type fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var hiddenNotesField = new NoteFieldDefinition\r\n{\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n};\r\n\r\nvar publicNotesField = new NoteFieldDefinition\r\n{\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n};\r\n\r\nvar hiddenNotesContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HideContentTypeFieldLinksDefinitionTests\r\n CanHideContentTypeFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests.CanHideContentTypeFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests\r\n 0\r\n HideContentTypeFieldLinksDefinitionTests.cs\r\n HideContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\HideContentTypeFieldLinksDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample HideContentTypeFieldLinksDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n HideContentTypeFieldLinksDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class HideContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HideContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class HideContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HideContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HideContentTypeFieldLinksDefinitionTests\r\n HideContentTypeFieldLinksDefinitionTestsClass\r\n \r\n ClassHideContentTypeFieldLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests\r\n 0\r\n HideContentTypeFieldLinksDefinitionTests.cs\r\n HideContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\HideContentTypeFieldLinksDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanHideContentTypeFields = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Reorder content type fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var hiddenNotesField = new NoteFieldDefinition\r\n{\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n};\r\n\r\nvar publicNotesField = new NoteFieldDefinition\r\n{\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n};\r\n\r\nvar hiddenNotesContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HideContentTypeFieldLinksDefinitionTests\r\n CanHideContentTypeFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests.CanHideContentTypeFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests\r\n 0\r\n HideContentTypeFieldLinksDefinitionTests.cs\r\n HideContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\HideContentTypeFieldLinksDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample HideContentTypeFieldLinksDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n HideContentTypeFieldLinksDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class HideContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HideContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class HideContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HideContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanHideContentTypeFields()\r\n {\r\n var hiddenNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Hidden Notes\",\r\n InternalName = \"m2_HiddenNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"13C47F4C-F3BA-431E-A76B-FCC03FED4E9B\"),\r\n };\r\n\r\n var publicNotesField = new NoteFieldDefinition\r\n {\r\n Title = \"Publis Notes\",\r\n InternalName = \"m2_PublicNotes\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"BACEE8AA-90B4-4268-8257-EEA0706942E4\"),\r\n };\r\n\r\n var hiddenNotesContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Hidden Notes\",\r\n Id = new Guid(\"1166D859-CC4B-4A5F-A1F3-28BE508C5A92\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(hiddenNotesField)\r\n .AddField(publicNotesField)\r\n .AddContentType(hiddenNotesContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(hiddenNotesField)\r\n .AddContentTypeFieldLink(publicNotesField)\r\n .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = hiddenNotesField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HideContentTypeFieldLinksDefinitionTests\r\n HideContentTypeFieldLinksDefinitionTestsClass\r\n \r\n ClassHideContentTypeFieldLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HideContentTypeFieldLinksDefinitionTests\r\n 0\r\n HideContentTypeFieldLinksDefinitionTests.cs\r\n HideContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\HideContentTypeFieldLinksDefinitionTests.cs\r\n"); } public static class HideContentTypeLinksDefinitionTests @@ -879,51 +915,51 @@ public static class HideContentTypeLinksDefinitionTests public static class InformationRightsManagementSettingsDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Add IRM settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n InformationRightsManagementSettingsDefinitionTests\r\n CanDeploySimpleInformationRightsManagementSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests.CanDeploySimpleInformationRightsManagementSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests\r\n 0\r\n InformationRightsManagementSettingsDefinitionTests.cs\r\n InformationRightsManagementSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\InformationRightsManagementSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n InformationRightsManagementSettingsDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class InformationRightsManagementSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.InformationRightsManagementSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add IRM settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class InformationRightsManagementSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.InformationRightsManagementSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add IRM settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n InformationRightsManagementSettingsDefinitionTests\r\n InformationRightsManagementSettingsDefinitionTestsClass\r\n \r\n ClassInformationRightsManagementSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests\r\n 0\r\n InformationRightsManagementSettingsDefinitionTests.cs\r\n InformationRightsManagementSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\InformationRightsManagementSettingsDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Add IRM settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n InformationRightsManagementSettingsDefinitionTests\r\n CanDeploySimpleInformationRightsManagementSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests.CanDeploySimpleInformationRightsManagementSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests\r\n 0\r\n InformationRightsManagementSettingsDefinitionTests.cs\r\n InformationRightsManagementSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\InformationRightsManagementSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n InformationRightsManagementSettingsDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class InformationRightsManagementSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.InformationRightsManagementSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add IRM settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class InformationRightsManagementSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.InformationRightsManagementSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add IRM settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n InformationRightsManagementSettingsDefinitionTests\r\n InformationRightsManagementSettingsDefinitionTestsClass\r\n \r\n ClassInformationRightsManagementSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests\r\n 0\r\n InformationRightsManagementSettingsDefinitionTests.cs\r\n InformationRightsManagementSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\InformationRightsManagementSettingsDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleInformationRightsManagementSettingsDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Add IRM settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n InformationRightsManagementSettingsDefinitionTests\r\n CanDeploySimpleInformationRightsManagementSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests.CanDeploySimpleInformationRightsManagementSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests\r\n 0\r\n InformationRightsManagementSettingsDefinitionTests.cs\r\n InformationRightsManagementSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\InformationRightsManagementSettingsDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample InformationRightsManagementSettingsDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n InformationRightsManagementSettingsDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class InformationRightsManagementSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.InformationRightsManagementSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add IRM settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class InformationRightsManagementSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.InformationRightsManagementSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add IRM settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n InformationRightsManagementSettingsDefinitionTests\r\n InformationRightsManagementSettingsDefinitionTestsClass\r\n \r\n ClassInformationRightsManagementSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests\r\n 0\r\n InformationRightsManagementSettingsDefinitionTests.cs\r\n InformationRightsManagementSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\InformationRightsManagementSettingsDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleInformationRightsManagementSettingsDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Add IRM settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n InformationRightsManagementSettingsDefinitionTests\r\n CanDeploySimpleInformationRightsManagementSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests.CanDeploySimpleInformationRightsManagementSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests\r\n 0\r\n InformationRightsManagementSettingsDefinitionTests.cs\r\n InformationRightsManagementSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\InformationRightsManagementSettingsDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample InformationRightsManagementSettingsDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n InformationRightsManagementSettingsDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class InformationRightsManagementSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.InformationRightsManagementSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add IRM settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class InformationRightsManagementSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.InformationRightsManagementSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add IRM settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleInformationRightsManagementSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n InformationRightsManagementSettingsDefinitionTests\r\n InformationRightsManagementSettingsDefinitionTestsClass\r\n \r\n ClassInformationRightsManagementSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.InformationRightsManagementSettingsDefinitionTests\r\n 0\r\n InformationRightsManagementSettingsDefinitionTests.cs\r\n InformationRightsManagementSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\InformationRightsManagementSettingsDefinitionTests.cs\r\n"); } public static class JobDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add timer job\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JobDefinitionTests\r\n CanDeploySimpleJobDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests.CanDeploySimpleJobDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests\r\n 0\r\n JobDefinitionTests.cs\r\n JobDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\JobDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n JobDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class JobDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JobDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add timer job\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class JobDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JobDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add timer job\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JobDefinitionTests\r\n JobDefinitionTestsClass\r\n \r\n ClassJobDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests\r\n 0\r\n JobDefinitionTests.cs\r\n JobDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\JobDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add timer job\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JobDefinitionTests\r\n CanDeploySimpleJobDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests.CanDeploySimpleJobDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests\r\n 0\r\n JobDefinitionTests.cs\r\n JobDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\JobDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n JobDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class JobDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JobDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add timer job\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class JobDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JobDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add timer job\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JobDefinitionTests\r\n JobDefinitionTestsClass\r\n \r\n ClassJobDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests\r\n 0\r\n JobDefinitionTests.cs\r\n JobDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\JobDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleJobDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add timer job\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JobDefinitionTests\r\n CanDeploySimpleJobDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests.CanDeploySimpleJobDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests\r\n 0\r\n JobDefinitionTests.cs\r\n JobDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\JobDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample JobDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n JobDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class JobDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JobDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add timer job\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class JobDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JobDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add timer job\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JobDefinitionTests\r\n JobDefinitionTestsClass\r\n \r\n ClassJobDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests\r\n 0\r\n JobDefinitionTests.cs\r\n JobDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\JobDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleJobDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add timer job\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JobDefinitionTests\r\n CanDeploySimpleJobDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests.CanDeploySimpleJobDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests\r\n 0\r\n JobDefinitionTests.cs\r\n JobDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\JobDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample JobDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n JobDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class JobDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JobDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add timer job\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class JobDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JobDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add timer job\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJobDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JobDefinitionTests\r\n JobDefinitionTestsClass\r\n \r\n ClassJobDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JobDefinitionTests\r\n 0\r\n JobDefinitionTests.cs\r\n JobDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\JobDefinitionTests.cs\r\n"); } public static class ListDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list by template type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var genericList = new ListDefinition\r\n{\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployListByTemplateId\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployListByTemplateId\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list by template name\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var contactsList = new ListDefinition\r\n{\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(contactsList);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployListByTemplateName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployListByTemplateName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add host Style Library\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployStyleLibrary\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployStyleLibrary\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add host OOTB lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployOOTBListsLibrary\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployOOTBListsLibrary\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add multiple lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeploySimpleLists\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeploySimpleLists\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add promoted links list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listDef = new ListDefinition\r\n{\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployPromotedLinksList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployPromotedLinksList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host Style Library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host OOTB lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multiple lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add promoted links list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host Style Library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host OOTB lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multiple lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add promoted links list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n ListDefinitionTestsClass\r\n \r\n ClassListDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add list by template type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var genericList = new ListDefinition\r\n{\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployListByTemplateId\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployListByTemplateId\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add list by template name\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var contactsList = new ListDefinition\r\n{\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(contactsList);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployListByTemplateName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployListByTemplateName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add host Style Library\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployStyleLibrary\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployStyleLibrary\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add host OOTB lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployOOTBListsLibrary\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployOOTBListsLibrary\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add multiple lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeploySimpleLists\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeploySimpleLists\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add promoted links list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listDef = new ListDefinition\r\n{\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployPromotedLinksList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployPromotedLinksList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n ListDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host Style Library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host OOTB lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multiple lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add promoted links list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host Style Library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host OOTB lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multiple lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add promoted links list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n ListDefinitionTestsClass\r\n \r\n ClassListDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployListByTemplateId = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list by template type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var genericList = new ListDefinition\r\n{\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployListByTemplateId\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployListByTemplateId\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployListByTemplateName = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list by template name\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var contactsList = new ListDefinition\r\n{\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(contactsList);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployListByTemplateName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployListByTemplateName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployStyleLibrary = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add host Style Library\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployStyleLibrary\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployStyleLibrary\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployOOTBListsLibrary = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add host OOTB lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployOOTBListsLibrary\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployOOTBListsLibrary\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleLists = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add multiple lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeploySimpleLists\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeploySimpleLists\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPromotedLinksList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add promoted links list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listDef = new ListDefinition\r\n{\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployPromotedLinksList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployPromotedLinksList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ListDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host Style Library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host OOTB lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multiple lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add promoted links list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host Style Library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host OOTB lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multiple lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add promoted links list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n ListDefinitionTestsClass\r\n \r\n ClassListDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployListByTemplateId = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add list by template type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var genericList = new ListDefinition\r\n{\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployListByTemplateId\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployListByTemplateId\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployListByTemplateName = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add list by template name\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var contactsList = new ListDefinition\r\n{\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(contactsList);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployListByTemplateName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployListByTemplateName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployStyleLibrary = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add host Style Library\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployStyleLibrary\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployStyleLibrary\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployOOTBListsLibrary = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add host OOTB lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployOOTBListsLibrary\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployOOTBListsLibrary\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleLists = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add multiple lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeploySimpleLists\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeploySimpleLists\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPromotedLinksList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add promoted links list\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listDef = new ListDefinition\r\n{\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n CanDeployPromotedLinksList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests.CanDeployPromotedLinksList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ListDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n ListDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host Style Library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host OOTB lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multiple lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add promoted links list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTagAttribute(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateId()\r\n {\r\n var genericList = new ListDefinition\r\n {\r\n Title = \"Generic list\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"GenericList\"\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"Document library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"DocumentLibrary\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(genericList);\r\n web.AddList(documentLibrary);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list by template name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployListByTemplateName()\r\n {\r\n var contactsList = new ListDefinition\r\n {\r\n Title = \"Some Assert\",\r\n Description = \"Some Assert.\",\r\n TemplateName = BuiltInListTemplates.AssetLibrary.InternalName,\r\n Url = \"SomeAssert\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(contactsList);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host Style Library\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployStyleLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add host OOTB lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployOOTBListsLibrary()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n // do stuff\r\n });\r\n\r\n web.AddHostList(BuiltInListDefinitions.SiteAssets, list =>\r\n {\r\n // do stuff\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multiple lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLists()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWeb(DocWebs.AboutOurCompany, aboutWeb =>\r\n {\r\n aboutWeb\r\n .AddList(DocLists.AboutUsLists.ManagementTeam)\r\n .AddList(DocLists.AboutUsLists.OurClients);\r\n })\r\n .AddWeb(DocWebs.DepartmentWebs.HR, hrWeb =>\r\n {\r\n hrWeb\r\n .AddList(DocLists.HRLists.AnnualReviews)\r\n .AddList(DocLists.HRLists.Poicies)\r\n .AddList(DocLists.HRLists.Procedures);\r\n })\r\n .AddWeb(DocWebs.Departments, departmentWeb =>\r\n {\r\n departmentWeb\r\n .AddList(DocLists.DepartmentsLists.IssueRegister)\r\n .AddList(DocLists.DepartmentsLists.TeamEvents)\r\n .AddList(DocLists.DepartmentsLists.TeamTasks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add promoted links list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPromotedLinksList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"My Links\",\r\n TemplateName = BuiltInListTemplates.PromotedLinks.InternalName,\r\n CustomUrl = \"/lists/my-links\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListDefinitionTests\r\n ListDefinitionTestsClass\r\n \r\n ClassListDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListDefinitionTests\r\n 0\r\n ListDefinitionTests.cs\r\n ListDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListDefinitionTests.cs\r\n"); } public static class ListFieldLinkDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add field links to list\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var fieldDef = new TextFieldDefinition\r\n{\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n};\r\n\r\nvar listDef = new ListDefinition\r\n{\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTextField(fieldDef);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListFieldLinkDefinitionTests\r\n CanDeploySimpleListFieldLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests.CanDeploySimpleListFieldLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests\r\n 0\r\n ListFieldLinkDefinitionTests.cs\r\n ListFieldLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListFieldLinkDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListFieldLinkDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListFieldLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListFieldLinkDefinition\")]\r\n [SampleMetadata(Title = \"Add field links to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListFieldLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListFieldLinkDefinition\")]\r\n [SampleMetadata(Title = \"Add field links to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListFieldLinkDefinitionTests\r\n ListFieldLinkDefinitionTestsClass\r\n \r\n ClassListFieldLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests\r\n 0\r\n ListFieldLinkDefinitionTests.cs\r\n ListFieldLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListFieldLinkDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Add field links to list\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var fieldDef = new TextFieldDefinition\r\n{\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n};\r\n\r\nvar listDef = new ListDefinition\r\n{\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTextField(fieldDef);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListFieldLinkDefinitionTests\r\n CanDeploySimpleListFieldLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests.CanDeploySimpleListFieldLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests\r\n 0\r\n ListFieldLinkDefinitionTests.cs\r\n ListFieldLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListFieldLinkDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n ListFieldLinkDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListFieldLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListFieldLinkDefinition\")]\r\n [SampleMetadata(Title = \"Add field links to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListFieldLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListFieldLinkDefinition\")]\r\n [SampleMetadata(Title = \"Add field links to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListFieldLinkDefinitionTests\r\n ListFieldLinkDefinitionTestsClass\r\n \r\n ClassListFieldLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests\r\n 0\r\n ListFieldLinkDefinitionTests.cs\r\n ListFieldLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListFieldLinkDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleListFieldLinkDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add field links to list\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var fieldDef = new TextFieldDefinition\r\n{\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n};\r\n\r\nvar listDef = new ListDefinition\r\n{\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTextField(fieldDef);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListFieldLinkDefinitionTests\r\n CanDeploySimpleListFieldLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests.CanDeploySimpleListFieldLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests\r\n 0\r\n ListFieldLinkDefinitionTests.cs\r\n ListFieldLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListFieldLinkDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ListFieldLinkDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListFieldLinkDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListFieldLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListFieldLinkDefinition\")]\r\n [SampleMetadata(Title = \"Add field links to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListFieldLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListFieldLinkDefinition\")]\r\n [SampleMetadata(Title = \"Add field links to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListFieldLinkDefinitionTests\r\n ListFieldLinkDefinitionTestsClass\r\n \r\n ClassListFieldLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests\r\n 0\r\n ListFieldLinkDefinitionTests.cs\r\n ListFieldLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListFieldLinkDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleListFieldLinkDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Add field links to list\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var fieldDef = new TextFieldDefinition\r\n{\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n};\r\n\r\nvar listDef = new ListDefinition\r\n{\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTextField(fieldDef);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListFieldLinkDefinitionTests\r\n CanDeploySimpleListFieldLinkDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests.CanDeploySimpleListFieldLinkDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests\r\n 0\r\n ListFieldLinkDefinitionTests.cs\r\n ListFieldLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListFieldLinkDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ListFieldLinkDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n ListFieldLinkDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListFieldLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListFieldLinkDefinition\")]\r\n [SampleMetadata(Title = \"Add field links to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListFieldLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListFieldLinkDefinition\")]\r\n [SampleMetadata(Title = \"Add field links to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListFieldLinkDefinition()\r\n {\r\n var fieldDef = new TextFieldDefinition\r\n {\r\n Title = \"Customer number\",\r\n InternalName = \"m2CustomNumber\",\r\n Id = new Guid(\"87247c7d-1ecc-4503-bfd5-21f107b442fb\")\r\n };\r\n\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Customers\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/customers\",\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTextField(fieldDef);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n // will add a link to the site level field\r\n list.AddListFieldLink(fieldDef);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListFieldLinkDefinitionTests\r\n ListFieldLinkDefinitionTestsClass\r\n \r\n ClassListFieldLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListFieldLinkDefinitionTests\r\n 0\r\n ListFieldLinkDefinitionTests.cs\r\n ListFieldLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListFieldLinkDefinitionTests.cs\r\n"); } public static class ListItemDefinitionTests @@ -939,53 +975,53 @@ public static class ListItemDefinitionTests public static class ListItemFieldValueDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Add list item field value\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListItemFieldValueDefinitionTests\r\n CanDeploySimpleListItemFieldValueDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests.CanDeploySimpleListItemFieldValueDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests\r\n 0\r\n ListItemFieldValueDefinitionTests.cs\r\n ListItemFieldValueDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListItemFieldValueDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n ListItemFieldValueDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListItemFieldValueDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListItemFieldValueDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list item field value\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListItemFieldValueDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListItemFieldValueDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list item field value\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListItemFieldValueDefinitionTests\r\n ListItemFieldValueDefinitionTestsClass\r\n \r\n ClassListItemFieldValueDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests\r\n 0\r\n ListItemFieldValueDefinitionTests.cs\r\n ListItemFieldValueDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListItemFieldValueDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list item field value\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListItemFieldValueDefinitionTests\r\n CanDeploySimpleListItemFieldValueDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests.CanDeploySimpleListItemFieldValueDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests\r\n 0\r\n ListItemFieldValueDefinitionTests.cs\r\n ListItemFieldValueDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListItemFieldValueDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListItemFieldValueDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListItemFieldValueDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListItemFieldValueDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list item field value\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListItemFieldValueDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListItemFieldValueDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list item field value\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListItemFieldValueDefinitionTests\r\n ListItemFieldValueDefinitionTestsClass\r\n \r\n ClassListItemFieldValueDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests\r\n 0\r\n ListItemFieldValueDefinitionTests.cs\r\n ListItemFieldValueDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListItemFieldValueDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleListItemFieldValueDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Add list item field value\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListItemFieldValueDefinitionTests\r\n CanDeploySimpleListItemFieldValueDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests.CanDeploySimpleListItemFieldValueDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests\r\n 0\r\n ListItemFieldValueDefinitionTests.cs\r\n ListItemFieldValueDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListItemFieldValueDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ListItemFieldValueDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n ListItemFieldValueDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListItemFieldValueDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListItemFieldValueDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list item field value\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListItemFieldValueDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListItemFieldValueDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list item field value\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListItemFieldValueDefinitionTests\r\n ListItemFieldValueDefinitionTestsClass\r\n \r\n ClassListItemFieldValueDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests\r\n 0\r\n ListItemFieldValueDefinitionTests.cs\r\n ListItemFieldValueDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListItemFieldValueDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleListItemFieldValueDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list item field value\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListItemFieldValueDefinitionTests\r\n CanDeploySimpleListItemFieldValueDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests.CanDeploySimpleListItemFieldValueDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests\r\n 0\r\n ListItemFieldValueDefinitionTests.cs\r\n ListItemFieldValueDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListItemFieldValueDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ListItemFieldValueDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListItemFieldValueDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListItemFieldValueDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListItemFieldValueDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list item field value\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListItemFieldValueDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListItemFieldValueDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list item field value\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListItemFieldValueDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListItemFieldValueDefinitionTests\r\n ListItemFieldValueDefinitionTestsClass\r\n \r\n ClassListItemFieldValueDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListItemFieldValueDefinitionTests\r\n 0\r\n ListItemFieldValueDefinitionTests.cs\r\n ListItemFieldValueDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListItemFieldValueDefinitionTests.cs\r\n"); } public static class ListViewDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list view\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var approvedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar inProgressDocuments = new ListViewDefinition\r\n{\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViews\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViews\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list view with URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var returnedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViewsWithCustomUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViewsWithCustomUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list view with CAML\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var createdQuery = new StringBuilder();\r\n\r\ncreatedQuery.Append(\"<Where>\");\r\ncreatedQuery.Append(\"</Where>\");\r\ncreatedQuery.Append(\"<OrderBy>\");\r\ncreatedQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\ncreatedQuery.Append(\"</OrderBy>\");\r\n\r\nvar lastTenCreatedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar editedQuery = new StringBuilder();\r\n\r\neditedQuery.Append(\"<Where>\");\r\neditedQuery.Append(\"</Where>\");\r\neditedQuery.Append(\"<OrderBy>\");\r\neditedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\neditedQuery.Append(\"</OrderBy>\");\r\n\r\nvar lastTenEditedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViewsWithCAMLQuery\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViewsWithCAMLQuery\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n Lists views\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListViewDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListViewDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view with URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n [SampleMetadata(Title = \"Add list view with CAML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListViewDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view with URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n [SampleMetadata(Title = \"Add list view with CAML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n ListViewDefinitionTestsClass\r\n \r\n ClassListViewDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n Add list view\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var approvedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar inProgressDocuments = new ListViewDefinition\r\n{\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViews\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViews\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n Add list view with URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var returnedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViewsWithCustomUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViewsWithCustomUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n Add list view with CAML\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var createdQuery = new StringBuilder();\r\n\r\ncreatedQuery.Append(\"<Where>\");\r\ncreatedQuery.Append(\"</Where>\");\r\ncreatedQuery.Append(\"<OrderBy>\");\r\ncreatedQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\ncreatedQuery.Append(\"</OrderBy>\");\r\n\r\nvar lastTenCreatedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar editedQuery = new StringBuilder();\r\n\r\neditedQuery.Append(\"<Where>\");\r\neditedQuery.Append(\"</Where>\");\r\neditedQuery.Append(\"<OrderBy>\");\r\neditedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\neditedQuery.Append(\"</OrderBy>\");\r\n\r\nvar lastTenEditedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViewsWithCAMLQuery\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViewsWithCAMLQuery\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n Lists views\r\n \r\n \r\n \r\n ListViewDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListViewDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view with URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n [SampleMetadata(Title = \"Add list view with CAML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListViewDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view with URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n [SampleMetadata(Title = \"Add list view with CAML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n ListViewDefinitionTestsClass\r\n \r\n ClassListViewDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleListViews = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list view\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var approvedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar inProgressDocuments = new ListViewDefinition\r\n{\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViews\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViews\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleListViewsWithCustomUrl = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list view with URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var returnedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViewsWithCustomUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViewsWithCustomUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleListViewsWithCAMLQuery = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add list view with CAML\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var createdQuery = new StringBuilder();\r\n\r\ncreatedQuery.Append(\"<Where>\");\r\ncreatedQuery.Append(\"</Where>\");\r\ncreatedQuery.Append(\"<OrderBy>\");\r\ncreatedQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\ncreatedQuery.Append(\"</OrderBy>\");\r\n\r\nvar lastTenCreatedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar editedQuery = new StringBuilder();\r\n\r\neditedQuery.Append(\"<Where>\");\r\neditedQuery.Append(\"</Where>\");\r\neditedQuery.Append(\"<OrderBy>\");\r\neditedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\neditedQuery.Append(\"</OrderBy>\");\r\n\r\nvar lastTenEditedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViewsWithCAMLQuery\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViewsWithCAMLQuery\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ListViewDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n Lists views\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListViewDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListViewDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view with URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n [SampleMetadata(Title = \"Add list view with CAML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListViewDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view with URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n [SampleMetadata(Title = \"Add list view with CAML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n ListViewDefinitionTestsClass\r\n \r\n ClassListViewDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleListViews = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n Add list view\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var approvedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar inProgressDocuments = new ListViewDefinition\r\n{\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViews\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViews\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleListViewsWithCustomUrl = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n Add list view with URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var returnedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViewsWithCustomUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViewsWithCustomUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleListViewsWithCAMLQuery = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n \r\n \r\n \r\n Add list view with CAML\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var createdQuery = new StringBuilder();\r\n\r\ncreatedQuery.Append(\"<Where>\");\r\ncreatedQuery.Append(\"</Where>\");\r\ncreatedQuery.Append(\"<OrderBy>\");\r\ncreatedQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\ncreatedQuery.Append(\"</OrderBy>\");\r\n\r\nvar lastTenCreatedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar editedQuery = new StringBuilder();\r\n\r\neditedQuery.Append(\"<Where>\");\r\neditedQuery.Append(\"</Where>\");\r\neditedQuery.Append(\"<OrderBy>\");\r\neditedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\neditedQuery.Append(\"</OrderBy>\");\r\n\r\nvar lastTenEditedDocuments = new ListViewDefinition\r\n{\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n};\r\n\r\nvar documentLibrary = new ListDefinition\r\n{\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n CanDeploySimpleListViewsWithCAMLQuery\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests.CanDeploySimpleListViewsWithCAMLQuery\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ListViewDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists views\r\n Lists views\r\n \r\n \r\n \r\n ListViewDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListViewDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view with URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n [SampleMetadata(Title = \"Add list view with CAML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListViewDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViews()\r\n {\r\n var approvedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Approved Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var inProgressDocuments = new ListViewDefinition\r\n {\r\n Title = \"In Progress Documents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(approvedDocuments);\r\n list.AddListView(inProgressDocuments);\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add list view with URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCustomUrl()\r\n {\r\n var returnedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Returned Documents\",\r\n Url = \"Returned.aspx\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(returnedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewDefinition\")]\r\n [SampleMetadata(Title = \"Add list view with CAML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleListViewsWithCAMLQuery()\r\n {\r\n var createdQuery = new StringBuilder();\r\n\r\n createdQuery.Append(\"<Where>\");\r\n createdQuery.Append(\"</Where>\");\r\n createdQuery.Append(\"<OrderBy>\");\r\n createdQuery.Append(\" <FieldRef Name=\'ID\' Ascending=\'FALSE\'/>\");\r\n createdQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenCreatedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Created Documents\",\r\n RowLimit = 10,\r\n Query = createdQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var editedQuery = new StringBuilder();\r\n\r\n editedQuery.Append(\"<Where>\");\r\n editedQuery.Append(\"</Where>\");\r\n editedQuery.Append(\"<OrderBy>\");\r\n editedQuery.Append(\" <FieldRef Name=\'Modified\' Ascending=\'FALSE\'/>\");\r\n editedQuery.Append(\"</OrderBy>\");\r\n\r\n var lastTenEditedDocuments = new ListViewDefinition\r\n {\r\n Title = \"Last 10 Edited Documents\",\r\n RowLimit = 10,\r\n Query = editedQuery.ToString(),\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n }\r\n };\r\n\r\n var documentLibrary = new ListDefinition\r\n {\r\n Title = \"CustomerDocuments\",\r\n Description = \"A customr document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"CustomerDocuments\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(documentLibrary, list =>\r\n {\r\n list.AddListView(lastTenCreatedDocuments);\r\n list.AddListView(lastTenEditedDocuments);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewDefinitionTests\r\n ListViewDefinitionTestsClass\r\n \r\n ClassListViewDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewDefinitionTests\r\n 0\r\n ListViewDefinitionTests.cs\r\n ListViewDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewDefinitionTests.cs\r\n"); } public static class ListViewWebPartDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add LVWP binded to list by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var travelRequests = new ListDefinition\r\n{\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add LVWP binded to list by URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var annualReviewsLibrary = new ListDefinition\r\n{\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add LVWP binded to list view by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var incidentsLibrary = new ListDefinition\r\n{\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n};\r\n\r\nvar incidentsView = new ListViewDefinition\r\n{\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListViewTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListViewTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add LVWP binded to calendar view\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var companyEvents = new ListDefinition\r\n{\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartToCalendarView\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartToCalendarView\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListViewWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListViewWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to calendar view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListViewWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to calendar view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n ListViewWebPartDefinitionTestsClass\r\n \r\n ClassListViewWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add LVWP binded to list by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var travelRequests = new ListDefinition\r\n{\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add LVWP binded to list by URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var annualReviewsLibrary = new ListDefinition\r\n{\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add LVWP binded to list view by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var incidentsLibrary = new ListDefinition\r\n{\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n};\r\n\r\nvar incidentsView = new ListViewDefinition\r\n{\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListViewTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListViewTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add LVWP binded to calendar view\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var companyEvents = new ListDefinition\r\n{\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartToCalendarView\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartToCalendarView\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ListViewWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListViewWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to calendar view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListViewWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to calendar view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n ListViewWebPartDefinitionTestsClass\r\n \r\n ClassListViewWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanBindListViewWebPartByListTitle = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add LVWP binded to list by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var travelRequests = new ListDefinition\r\n{\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanBindListViewWebPartByListUrl = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add LVWP binded to list by URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var annualReviewsLibrary = new ListDefinition\r\n{\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanBindListViewWebPartByListViewTitle = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add LVWP binded to list view by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var incidentsLibrary = new ListDefinition\r\n{\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n};\r\n\r\nvar incidentsView = new ListViewDefinition\r\n{\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListViewTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListViewTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanBindListViewWebPartToCalendarView = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add LVWP binded to calendar view\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var companyEvents = new ListDefinition\r\n{\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartToCalendarView\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartToCalendarView\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ListViewWebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ListViewWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListViewWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to calendar view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListViewWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to calendar view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n ListViewWebPartDefinitionTestsClass\r\n \r\n ClassListViewWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanBindListViewWebPartByListTitle = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add LVWP binded to list by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var travelRequests = new ListDefinition\r\n{\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanBindListViewWebPartByListUrl = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add LVWP binded to list by URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var annualReviewsLibrary = new ListDefinition\r\n{\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanBindListViewWebPartByListViewTitle = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add LVWP binded to list view by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var incidentsLibrary = new ListDefinition\r\n{\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n};\r\n\r\nvar incidentsView = new ListViewDefinition\r\n{\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartByListViewTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartByListViewTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanBindListViewWebPartToCalendarView = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add LVWP binded to calendar view\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var companyEvents = new ListDefinition\r\n{\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar listView = new ListViewWebPartDefinition\r\n{\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n CanBindListViewWebPartToCalendarView\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests.CanBindListViewWebPartToCalendarView\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ListViewWebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ListViewWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ListViewWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to calendar view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ListViewWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListTitle()\r\n {\r\n var travelRequests = new ListDefinition\r\n {\r\n Title = \"Travel Requests\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2TravelRequests\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Travel Request Default View by List Title\",\r\n Id = \"m2TravelRequestsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = travelRequests.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(travelRequests)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListUrl()\r\n {\r\n var annualReviewsLibrary = new ListDefinition\r\n {\r\n Title = \"Annual Reviews\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2AnnualReviews\"\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Annual Reviews Default View by List Url\",\r\n Id = \"m2AnnualReviewsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = annualReviewsLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(annualReviewsLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartByListViewTitle()\r\n {\r\n var incidentsLibrary = new ListDefinition\r\n {\r\n Title = \"Incidents library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"m2Incidents\"\r\n };\r\n\r\n var incidentsView = new ListViewDefinition\r\n {\r\n Title = \"Last Incidents\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Last Incidents binding by List View Title\",\r\n Id = \"m2LastIncidentsView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = incidentsLibrary.GetListUrl(),\r\n ViewName = incidentsView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(incidentsLibrary, list =>\r\n {\r\n list.AddListView(incidentsView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add LVWP binded to calendar view\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindListViewWebPartToCalendarView()\r\n {\r\n var companyEvents = new ListDefinition\r\n {\r\n Title = \"Company Events\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.Events,\r\n Url = \"m2CompanyEvents\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 List View provision\",\r\n FileName = \"listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var listView = new ListViewWebPartDefinition\r\n {\r\n Title = \"Company Events by List View Title\",\r\n Id = \"m2CompanyEvents\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = companyEvents.GetListUrl(),\r\n ViewName = \"Calendar\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(companyEvents)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddListViewWebPart(listView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ListViewWebPartDefinitionTests\r\n ListViewWebPartDefinitionTestsClass\r\n \r\n ClassListViewWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ListViewWebPartDefinitionTests\r\n 0\r\n ListViewWebPartDefinitionTests.cs\r\n ListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ListViewWebPartDefinitionTests.cs\r\n"); } public static class LookupFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add lookup field\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var emptyLookupField = new LookupFieldDefinition\r\n{\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(emptyLookupField);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n CanDeployEmptyLookupField\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests.CanDeployEmptyLookupField\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add lookup field binded to list\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n var leadTypeLookup = new LookupFieldDefinition\r\n{\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n};\r\n\r\nvar lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(leadTypeLookup);\r\n});\r\n\r\nvar leadRecords = new ListDefinition\r\n{\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n};\r\n\r\nvar leadRecordTypes = new ListDefinition\r\n{\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n};\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n});\r\n\r\n// 1. deploy lookup field without bindings\r\nDeployModel(lookupFieldModel);\r\n\r\n// 2. deploy lists\r\nDeployModel(webModel);\r\n\r\n// 3. update binding for the lookup field\r\n// LookupList/LookupListId could also be used\r\nleadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n// 4. deploy lookup field again, so that it will be binded\r\nDeployModel(lookupFieldModel);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n CanDeployLookupFieldBindedToList\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests.CanDeployLookupFieldBindedToList\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n LookupFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class LookupFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field binded to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class LookupFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field binded to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n LookupFieldDefinitionTestsClass\r\n \r\n ClassLookupFieldDefinitionTestsClass\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add lookup field\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var emptyLookupField = new LookupFieldDefinition\r\n{\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(emptyLookupField);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n CanDeployEmptyLookupField\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests.CanDeployEmptyLookupField\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add lookup field binded to list\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n var leadTypeLookup = new LookupFieldDefinition\r\n{\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n};\r\n\r\nvar lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(leadTypeLookup);\r\n});\r\n\r\nvar leadRecords = new ListDefinition\r\n{\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n};\r\n\r\nvar leadRecordTypes = new ListDefinition\r\n{\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n};\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n});\r\n\r\n// 1. deploy lookup field without bindings\r\nDeployModel(lookupFieldModel);\r\n\r\n// 2. deploy lists\r\nDeployModel(webModel);\r\n\r\n// 3. update binding for the lookup field\r\n// LookupList/LookupListId could also be used\r\nleadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n// 4. deploy lookup field again, so that it will be binded\r\nDeployModel(lookupFieldModel);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n CanDeployLookupFieldBindedToList\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests.CanDeployLookupFieldBindedToList\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n LookupFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class LookupFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field binded to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class LookupFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field binded to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n LookupFieldDefinitionTestsClass\r\n \r\n ClassLookupFieldDefinitionTestsClass\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployEmptyLookupField = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add lookup field\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var emptyLookupField = new LookupFieldDefinition\r\n{\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(emptyLookupField);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n CanDeployEmptyLookupField\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests.CanDeployEmptyLookupField\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployLookupFieldBindedToList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add lookup field binded to list\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n var leadTypeLookup = new LookupFieldDefinition\r\n{\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n};\r\n\r\nvar lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(leadTypeLookup);\r\n});\r\n\r\nvar leadRecords = new ListDefinition\r\n{\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n};\r\n\r\nvar leadRecordTypes = new ListDefinition\r\n{\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n};\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n});\r\n\r\n// 1. deploy lookup field without bindings\r\nDeployModel(lookupFieldModel);\r\n\r\n// 2. deploy lists\r\nDeployModel(webModel);\r\n\r\n// 3. update binding for the lookup field\r\n// LookupList/LookupListId could also be used\r\nleadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n// 4. deploy lookup field again, so that it will be binded\r\nDeployModel(lookupFieldModel);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n CanDeployLookupFieldBindedToList\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests.CanDeployLookupFieldBindedToList\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample LookupFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n LookupFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class LookupFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field binded to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class LookupFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field binded to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n LookupFieldDefinitionTestsClass\r\n \r\n ClassLookupFieldDefinitionTestsClass\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployEmptyLookupField = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add lookup field\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var emptyLookupField = new LookupFieldDefinition\r\n{\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(emptyLookupField);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n CanDeployEmptyLookupField\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests.CanDeployEmptyLookupField\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployLookupFieldBindedToList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add lookup field binded to list\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n var leadTypeLookup = new LookupFieldDefinition\r\n{\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n};\r\n\r\nvar lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(leadTypeLookup);\r\n});\r\n\r\nvar leadRecords = new ListDefinition\r\n{\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n};\r\n\r\nvar leadRecordTypes = new ListDefinition\r\n{\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n};\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n});\r\n\r\n// 1. deploy lookup field without bindings\r\nDeployModel(lookupFieldModel);\r\n\r\n// 2. deploy lists\r\nDeployModel(webModel);\r\n\r\n// 3. update binding for the lookup field\r\n// LookupList/LookupListId could also be used\r\nleadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n// 4. deploy lookup field again, so that it will be binded\r\nDeployModel(lookupFieldModel);\r\n\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n CanDeployLookupFieldBindedToList\r\n \r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests.CanDeployLookupFieldBindedToList\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample LookupFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n LookupFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class LookupFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field binded to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class LookupFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployEmptyLookupField()\r\n {\r\n var emptyLookupField = new LookupFieldDefinition\r\n {\r\n Title = \"Empty Lookup Field\",\r\n InternalName = \"m2EmptyLookupField\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"B6387953-3967-4023-9D38-431F2C6A5E54\")\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(emptyLookupField);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LookupFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add lookup field binded to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployLookupFieldBindedToList()\r\n {\r\n var leadTypeLookup = new LookupFieldDefinition\r\n {\r\n Title = \"Lead Type\",\r\n InternalName = \"m2LeadType\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FEFC30A7-3B38-4034-BB2A-FFD538D46A63\")\r\n };\r\n\r\n var lookupFieldModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(leadTypeLookup);\r\n });\r\n\r\n var leadRecords = new ListDefinition\r\n {\r\n Title = \"Lead Records\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordsList\"\r\n };\r\n\r\n var leadRecordTypes = new ListDefinition\r\n {\r\n Title = \"Lead Record Types\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"m2LeadRecordTypesList\"\r\n };\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(leadRecords, list =>\r\n {\r\n list.AddListFieldLink(leadTypeLookup);\r\n })\r\n .AddList(leadRecordTypes);\r\n });\r\n\r\n // 1. deploy lookup field without bindings\r\n DeployModel(lookupFieldModel);\r\n\r\n // 2. deploy lists\r\n DeployModel(webModel);\r\n\r\n // 3. update binding for the lookup field\r\n // LookupList/LookupListId could also be used\r\n leadTypeLookup.LookupListTitle = leadRecordTypes.Title;\r\n\r\n // 4. deploy lookup field again, so that it will be binded\r\n DeployModel(lookupFieldModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference\r\n LookupFieldDefinitionTests\r\n LookupFieldDefinitionTestsClass\r\n \r\n ClassLookupFieldDefinitionTestsClass\r\n SubPointSolutions.Docs.Views.Views.SPMeta2.reference.LookupFieldDefinitionTests\r\n 0\r\n LookupFieldDefinitionTests.cs\r\n LookupFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\LookupFieldDefinitionTests.cs\r\n"); } public static class ManagedAccountDefinitionTests @@ -1001,11 +1037,11 @@ public static class ManagedAccountDefinitionTests public static class MasterPageDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n \r\n \r\n \r\n Add master page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var masterPage = new MasterPageDefinition\r\n{\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MasterPageDefinitionTests\r\n CanDeploySimpleMasterPageDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests.CanDeploySimpleMasterPageDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests\r\n 0\r\n MasterPageDefinitionTests.cs\r\n MasterPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MasterPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n Master page gallery\r\n \r\n \r\n \r\n MasterPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class MasterPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add master page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class MasterPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add master page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MasterPageDefinitionTests\r\n MasterPageDefinitionTestsClass\r\n \r\n ClassMasterPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests\r\n 0\r\n MasterPageDefinitionTests.cs\r\n MasterPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MasterPageDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n \r\n \r\n \r\n Add master page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var masterPage = new MasterPageDefinition\r\n{\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MasterPageDefinitionTests\r\n CanDeploySimpleMasterPageDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests.CanDeploySimpleMasterPageDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests\r\n 0\r\n MasterPageDefinitionTests.cs\r\n MasterPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MasterPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n Master page gallery\r\n \r\n \r\n \r\n MasterPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class MasterPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add master page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class MasterPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add master page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MasterPageDefinitionTests\r\n MasterPageDefinitionTestsClass\r\n \r\n ClassMasterPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests\r\n 0\r\n MasterPageDefinitionTests.cs\r\n MasterPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MasterPageDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleMasterPageDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n \r\n \r\n \r\n Add master page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var masterPage = new MasterPageDefinition\r\n{\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MasterPageDefinitionTests\r\n CanDeploySimpleMasterPageDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests.CanDeploySimpleMasterPageDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests\r\n 0\r\n MasterPageDefinitionTests.cs\r\n MasterPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MasterPageDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample MasterPageDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n Master page gallery\r\n \r\n \r\n \r\n MasterPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class MasterPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add master page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class MasterPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add master page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MasterPageDefinitionTests\r\n MasterPageDefinitionTestsClass\r\n \r\n ClassMasterPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests\r\n 0\r\n MasterPageDefinitionTests.cs\r\n MasterPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MasterPageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleMasterPageDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n \r\n \r\n \r\n Add master page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var masterPage = new MasterPageDefinition\r\n{\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MasterPageDefinitionTests\r\n CanDeploySimpleMasterPageDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests.CanDeploySimpleMasterPageDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests\r\n 0\r\n MasterPageDefinitionTests.cs\r\n MasterPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MasterPageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample MasterPageDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n Master page gallery\r\n \r\n \r\n \r\n MasterPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class MasterPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add master page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class MasterPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add master page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMasterPageDefinition()\r\n {\r\n var masterPage = new MasterPageDefinition\r\n {\r\n Title = \"M2 Oslo\",\r\n FileName = \"m2-oslo.master\",\r\n // replace with your master page content\r\n Content = Encoding.UTF8.GetBytes(DefaultMasterPageTemplates.Oslo),\r\n NeedOverride = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddMasterPage(masterPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MasterPageDefinitionTests\r\n MasterPageDefinitionTestsClass\r\n \r\n ClassMasterPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MasterPageDefinitionTests\r\n 0\r\n MasterPageDefinitionTests.cs\r\n MasterPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MasterPageDefinitionTests.cs\r\n"); } public static class MasterPageSettingsDefinitionTests @@ -1033,59 +1069,59 @@ public static class ModuleFileDefinitionTests public static class MultiChoiceFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add multichoice field\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n{\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddMultiChoiceField(fieldDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MultiChoiceFieldDefinitionTests\r\n CanDeploySimpleMultiChoiceFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests.CanDeploySimpleMultiChoiceFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests\r\n 0\r\n MultiChoiceFieldDefinitionTests.cs\r\n MultiChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MultiChoiceFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n MultiChoiceFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class MultiChoiceFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MultiChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multichoice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class MultiChoiceFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MultiChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multichoice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MultiChoiceFieldDefinitionTests\r\n MultiChoiceFieldDefinitionTestsClass\r\n \r\n ClassMultiChoiceFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests\r\n 0\r\n MultiChoiceFieldDefinitionTests.cs\r\n MultiChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MultiChoiceFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add multichoice field\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n{\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddMultiChoiceField(fieldDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MultiChoiceFieldDefinitionTests\r\n CanDeploySimpleMultiChoiceFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests.CanDeploySimpleMultiChoiceFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests\r\n 0\r\n MultiChoiceFieldDefinitionTests.cs\r\n MultiChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MultiChoiceFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n MultiChoiceFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class MultiChoiceFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MultiChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multichoice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class MultiChoiceFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MultiChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multichoice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MultiChoiceFieldDefinitionTests\r\n MultiChoiceFieldDefinitionTestsClass\r\n \r\n ClassMultiChoiceFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests\r\n 0\r\n MultiChoiceFieldDefinitionTests.cs\r\n MultiChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MultiChoiceFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleMultiChoiceFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add multichoice field\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n{\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddMultiChoiceField(fieldDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MultiChoiceFieldDefinitionTests\r\n CanDeploySimpleMultiChoiceFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests.CanDeploySimpleMultiChoiceFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests\r\n 0\r\n MultiChoiceFieldDefinitionTests.cs\r\n MultiChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MultiChoiceFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample MultiChoiceFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n MultiChoiceFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class MultiChoiceFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MultiChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multichoice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class MultiChoiceFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MultiChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multichoice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MultiChoiceFieldDefinitionTests\r\n MultiChoiceFieldDefinitionTestsClass\r\n \r\n ClassMultiChoiceFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests\r\n 0\r\n MultiChoiceFieldDefinitionTests.cs\r\n MultiChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MultiChoiceFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleMultiChoiceFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add multichoice field\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n{\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddMultiChoiceField(fieldDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MultiChoiceFieldDefinitionTests\r\n CanDeploySimpleMultiChoiceFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests.CanDeploySimpleMultiChoiceFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests\r\n 0\r\n MultiChoiceFieldDefinitionTests.cs\r\n MultiChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MultiChoiceFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample MultiChoiceFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n MultiChoiceFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class MultiChoiceFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MultiChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multichoice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class MultiChoiceFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MultiChoiceFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add multichoice field\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMultiChoiceFieldDefinition()\r\n {\r\n var fieldDef = new MultiChoiceFieldDefinition\r\n {\r\n Title = \"Tasks label\",\r\n InternalName = \"dcs_ProgressTag\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"b08325aa-a750-4bf9-a73e-c470b86d37c8\"),\r\n Choices = new Collection<string>\r\n {\r\n \"internal\",\r\n \"external\",\r\n \"bug\",\r\n \"easy fix\",\r\n \"enhancement\"\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddMultiChoiceField(fieldDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MultiChoiceFieldDefinitionTests\r\n MultiChoiceFieldDefinitionTestsClass\r\n \r\n ClassMultiChoiceFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MultiChoiceFieldDefinitionTests\r\n 0\r\n MultiChoiceFieldDefinitionTests.cs\r\n MultiChoiceFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\MultiChoiceFieldDefinitionTests.cs\r\n"); } public static class NoteFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add note field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NoteFieldDefinitionTests\r\n CanDeploySimpleNoteFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests.CanDeploySimpleNoteFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests\r\n 0\r\n NoteFieldDefinitionTests.cs\r\n NoteFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NoteFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n NoteFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class NoteFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NoteFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add note field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class NoteFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NoteFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add note field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NoteFieldDefinitionTests\r\n NoteFieldDefinitionTestsClass\r\n \r\n ClassNoteFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests\r\n 0\r\n NoteFieldDefinitionTests.cs\r\n NoteFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NoteFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add note field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NoteFieldDefinitionTests\r\n CanDeploySimpleNoteFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests.CanDeploySimpleNoteFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests\r\n 0\r\n NoteFieldDefinitionTests.cs\r\n NoteFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NoteFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n NoteFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class NoteFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NoteFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add note field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class NoteFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NoteFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add note field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NoteFieldDefinitionTests\r\n NoteFieldDefinitionTestsClass\r\n \r\n ClassNoteFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests\r\n 0\r\n NoteFieldDefinitionTests.cs\r\n NoteFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NoteFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleNoteFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add note field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NoteFieldDefinitionTests\r\n CanDeploySimpleNoteFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests.CanDeploySimpleNoteFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests\r\n 0\r\n NoteFieldDefinitionTests.cs\r\n NoteFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NoteFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample NoteFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n NoteFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class NoteFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NoteFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add note field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class NoteFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NoteFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add note field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NoteFieldDefinitionTests\r\n NoteFieldDefinitionTestsClass\r\n \r\n ClassNoteFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests\r\n 0\r\n NoteFieldDefinitionTests.cs\r\n NoteFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NoteFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleNoteFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add note field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NoteFieldDefinitionTests\r\n CanDeploySimpleNoteFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests.CanDeploySimpleNoteFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests\r\n 0\r\n NoteFieldDefinitionTests.cs\r\n NoteFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NoteFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample NoteFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n NoteFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class NoteFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NoteFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add note field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class NoteFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NoteFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add note field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNoteFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NoteFieldDefinitionTests\r\n NoteFieldDefinitionTestsClass\r\n \r\n ClassNoteFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NoteFieldDefinitionTests\r\n 0\r\n NoteFieldDefinitionTests.cs\r\n NoteFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NoteFieldDefinitionTests.cs\r\n"); } public static class NumberFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add number field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NumberFieldDefinitionTests\r\n CanDeploySimpleNumberFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests.CanDeploySimpleNumberFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests\r\n 0\r\n NumberFieldDefinitionTests.cs\r\n NumberFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NumberFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n NumberFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class NumberFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NumberFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add number field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class NumberFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NumberFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add number field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NumberFieldDefinitionTests\r\n NumberFieldDefinitionTestsClass\r\n \r\n ClassNumberFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests\r\n 0\r\n NumberFieldDefinitionTests.cs\r\n NumberFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NumberFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add number field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NumberFieldDefinitionTests\r\n CanDeploySimpleNumberFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests.CanDeploySimpleNumberFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests\r\n 0\r\n NumberFieldDefinitionTests.cs\r\n NumberFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NumberFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n NumberFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class NumberFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NumberFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add number field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class NumberFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NumberFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add number field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NumberFieldDefinitionTests\r\n NumberFieldDefinitionTestsClass\r\n \r\n ClassNumberFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests\r\n 0\r\n NumberFieldDefinitionTests.cs\r\n NumberFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NumberFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleNumberFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add number field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NumberFieldDefinitionTests\r\n CanDeploySimpleNumberFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests.CanDeploySimpleNumberFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests\r\n 0\r\n NumberFieldDefinitionTests.cs\r\n NumberFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NumberFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample NumberFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n NumberFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class NumberFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NumberFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add number field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class NumberFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NumberFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add number field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NumberFieldDefinitionTests\r\n NumberFieldDefinitionTestsClass\r\n \r\n ClassNumberFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests\r\n 0\r\n NumberFieldDefinitionTests.cs\r\n NumberFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NumberFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleNumberFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add number field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NumberFieldDefinitionTests\r\n CanDeploySimpleNumberFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests.CanDeploySimpleNumberFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests\r\n 0\r\n NumberFieldDefinitionTests.cs\r\n NumberFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NumberFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample NumberFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n NumberFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class NumberFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NumberFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add number field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class NumberFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.NumberFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add number field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleNumberFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n NumberFieldDefinitionTests\r\n NumberFieldDefinitionTestsClass\r\n \r\n ClassNumberFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.NumberFieldDefinitionTests\r\n 0\r\n NumberFieldDefinitionTests.cs\r\n NumberFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\NumberFieldDefinitionTests.cs\r\n"); } public static class PrefixDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n Add prefix\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var prefixDef = new PrefixDefinition\r\n{\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n webApp.AddPrefix(prefixDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PrefixDefinitionTests\r\n CanDeploySimplePrefixDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests.CanDeploySimplePrefixDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests\r\n 0\r\n PrefixDefinitionTests.cs\r\n PrefixDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PrefixDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n PrefixDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PrefixDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PrefixDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add prefix\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PrefixDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PrefixDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add prefix\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PrefixDefinitionTests\r\n PrefixDefinitionTestsClass\r\n \r\n ClassPrefixDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests\r\n 0\r\n PrefixDefinitionTests.cs\r\n PrefixDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PrefixDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n Add prefix\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var prefixDef = new PrefixDefinition\r\n{\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n webApp.AddPrefix(prefixDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PrefixDefinitionTests\r\n CanDeploySimplePrefixDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests.CanDeploySimplePrefixDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests\r\n 0\r\n PrefixDefinitionTests.cs\r\n PrefixDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PrefixDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n PrefixDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PrefixDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PrefixDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add prefix\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PrefixDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PrefixDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add prefix\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PrefixDefinitionTests\r\n PrefixDefinitionTestsClass\r\n \r\n ClassPrefixDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests\r\n 0\r\n PrefixDefinitionTests.cs\r\n PrefixDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PrefixDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimplePrefixDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n Add prefix\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var prefixDef = new PrefixDefinition\r\n{\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n webApp.AddPrefix(prefixDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PrefixDefinitionTests\r\n CanDeploySimplePrefixDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests.CanDeploySimplePrefixDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests\r\n 0\r\n PrefixDefinitionTests.cs\r\n PrefixDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PrefixDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample PrefixDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n PrefixDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PrefixDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PrefixDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add prefix\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PrefixDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PrefixDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add prefix\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PrefixDefinitionTests\r\n PrefixDefinitionTestsClass\r\n \r\n ClassPrefixDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests\r\n 0\r\n PrefixDefinitionTests.cs\r\n PrefixDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PrefixDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimplePrefixDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n Add prefix\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var prefixDef = new PrefixDefinition\r\n{\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n{\r\n webApp.AddPrefix(prefixDef);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PrefixDefinitionTests\r\n CanDeploySimplePrefixDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests.CanDeploySimplePrefixDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests\r\n 0\r\n PrefixDefinitionTests.cs\r\n PrefixDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PrefixDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample PrefixDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n PrefixDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PrefixDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PrefixDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add prefix\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PrefixDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PrefixDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add prefix\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePrefixDefinition()\r\n {\r\n var prefixDef = new PrefixDefinition\r\n {\r\n Path = \"projects\",\r\n PrefixType = BuiltInPrefixTypes.WildcardInclusion\r\n };\r\n\r\n var model = SPMeta2Model.NewWebApplicationModel(webApp =>\r\n {\r\n webApp.AddPrefix(prefixDef);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PrefixDefinitionTests\r\n PrefixDefinitionTestsClass\r\n \r\n ClassPrefixDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PrefixDefinitionTests\r\n 0\r\n PrefixDefinitionTests.cs\r\n PrefixDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PrefixDefinitionTests.cs\r\n"); } public static class PropertyDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Add property to farm\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n var farmTag = new PropertyDefinition\r\n{\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n};\r\n\r\nvar farmType = new PropertyDefinition\r\n{\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n});\r\n\r\nDeploySSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderFarm\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderFarm\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Add property to site\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteTag = new PropertyDefinition\r\n{\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n};\r\n\r\nvar siteType = new PropertyDefinition\r\n{\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderSite\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderSite\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Add property to web\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var webTag = new PropertyDefinition\r\n{\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n};\r\n\r\nvar webType = new PropertyDefinition\r\n{\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Add property to list\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listTag = new PropertyDefinition\r\n{\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n};\r\n\r\nvar listType = new PropertyDefinition\r\n{\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n};\r\n\r\nvar listWithProperties = new ListDefinition\r\n{\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Add property to folder\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669 \r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var folderTag = new PropertyDefinition\r\n{\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n};\r\n\r\nvar folderType = new PropertyDefinition\r\n{\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n};\r\n\r\nvar listWithProperties = new ListDefinition\r\n{\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n};\r\n\r\nvar fodlerWithProperties = new FolderDefinition\r\n{\r\n Name = \"folder with properties\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669\r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n Property bags\r\n \r\n \r\n \r\n PropertyDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PropertyDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to farm\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669 \r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PropertyDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to farm\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669\r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n PropertyDefinitionTestsClass\r\n \r\n ClassPropertyDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add property to farm\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n var farmTag = new PropertyDefinition\r\n{\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n};\r\n\r\nvar farmType = new PropertyDefinition\r\n{\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n});\r\n\r\nDeploySSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderFarm\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderFarm\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add property to site\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteTag = new PropertyDefinition\r\n{\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n};\r\n\r\nvar siteType = new PropertyDefinition\r\n{\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderSite\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderSite\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add property to web\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var webTag = new PropertyDefinition\r\n{\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n};\r\n\r\nvar webType = new PropertyDefinition\r\n{\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add property to list\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listTag = new PropertyDefinition\r\n{\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n};\r\n\r\nvar listType = new PropertyDefinition\r\n{\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n};\r\n\r\nvar listWithProperties = new ListDefinition\r\n{\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add property to folder\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669 \r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var folderTag = new PropertyDefinition\r\n{\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n};\r\n\r\nvar folderType = new PropertyDefinition\r\n{\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n};\r\n\r\nvar listWithProperties = new ListDefinition\r\n{\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n};\r\n\r\nvar fodlerWithProperties = new FolderDefinition\r\n{\r\n Name = \"folder with properties\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669\r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n PropertyDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PropertyDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to farm\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669 \r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PropertyDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to farm\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669\r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n PropertyDefinitionTestsClass\r\n \r\n ClassPropertyDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPropertyBagUnderFarm = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Add property to farm\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n var farmTag = new PropertyDefinition\r\n{\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n};\r\n\r\nvar farmType = new PropertyDefinition\r\n{\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n});\r\n\r\nDeploySSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderFarm\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderFarm\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPropertyBagUnderSite = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Add property to site\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteTag = new PropertyDefinition\r\n{\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n};\r\n\r\nvar siteType = new PropertyDefinition\r\n{\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderSite\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderSite\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPropertyBagUnderWeb = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Add property to web\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var webTag = new PropertyDefinition\r\n{\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n};\r\n\r\nvar webType = new PropertyDefinition\r\n{\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPropertyBagUnderList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Add property to list\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listTag = new PropertyDefinition\r\n{\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n};\r\n\r\nvar listType = new PropertyDefinition\r\n{\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n};\r\n\r\nvar listWithProperties = new ListDefinition\r\n{\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPropertyBagUnderFolder = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Add property to folder\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669 \r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var folderTag = new PropertyDefinition\r\n{\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n};\r\n\r\nvar folderType = new PropertyDefinition\r\n{\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n};\r\n\r\nvar listWithProperties = new ListDefinition\r\n{\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n};\r\n\r\nvar fodlerWithProperties = new FolderDefinition\r\n{\r\n Name = \"folder with properties\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669\r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample PropertyDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n Web Application Model\r\n Farm Model\r\n Web Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n Property bags\r\n \r\n \r\n \r\n PropertyDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PropertyDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to farm\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669 \r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PropertyDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to farm\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669\r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n PropertyDefinitionTestsClass\r\n \r\n ClassPropertyDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPropertyBagUnderFarm = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add property to farm\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n var farmTag = new PropertyDefinition\r\n{\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n};\r\n\r\nvar farmType = new PropertyDefinition\r\n{\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewFarmModel(farm =>\r\n{\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n});\r\n\r\nDeploySSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderFarm\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderFarm\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPropertyBagUnderSite = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add property to site\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteTag = new PropertyDefinition\r\n{\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n};\r\n\r\nvar siteType = new PropertyDefinition\r\n{\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderSite\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderSite\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPropertyBagUnderWeb = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add property to web\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var webTag = new PropertyDefinition\r\n{\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n};\r\n\r\nvar webType = new PropertyDefinition\r\n{\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPropertyBagUnderList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add property to list\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listTag = new PropertyDefinition\r\n{\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n};\r\n\r\nvar listType = new PropertyDefinition\r\n{\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n};\r\n\r\nvar listWithProperties = new ListDefinition\r\n{\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPropertyBagUnderFolder = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n Add property to folder\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669 \r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var folderTag = new PropertyDefinition\r\n{\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n};\r\n\r\nvar folderType = new PropertyDefinition\r\n{\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n};\r\n\r\nvar listWithProperties = new ListDefinition\r\n{\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n};\r\n\r\nvar fodlerWithProperties = new FolderDefinition\r\n{\r\n Name = \"folder with properties\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669\r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n CanDeployPropertyBagUnderFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests.CanDeployPropertyBagUnderFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample PropertyDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Property bags\r\n Property bags\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n Farm Model\r\n Web Application Model\r\n Site Collection Model\r\n Web Model\r\n \r\n \r\n \r\n PropertyDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PropertyDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to farm\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669 \r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PropertyDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to farm\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFarm()\r\n {\r\n var farmTag = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_tag\",\r\n Value = \"m2_farm_tag_value\",\r\n };\r\n\r\n var farmType = new PropertyDefinition\r\n {\r\n Key = \"m2_farm_type\",\r\n Value = \"m2_farm_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewFarmModel(farm =>\r\n {\r\n farm\r\n .AddProperty(farmTag)\r\n .AddProperty(farmType);\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderSite()\r\n {\r\n var siteTag = new PropertyDefinition\r\n {\r\n Key = \"m2_site_tag\",\r\n Value = \"m2_site_tag_value\",\r\n };\r\n\r\n var siteType = new PropertyDefinition\r\n {\r\n Key = \"m2_site_type\",\r\n Value = \"m2_site_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddProperty(siteTag)\r\n .AddProperty(siteType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderWeb()\r\n {\r\n var webTag = new PropertyDefinition\r\n {\r\n Key = \"m2_web_tag\",\r\n Value = \"m2_web_tag_value\",\r\n };\r\n\r\n var webType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddProperty(webTag)\r\n .AddProperty(webType);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add property to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderList()\r\n {\r\n var listTag = new PropertyDefinition\r\n {\r\n Key = \"m2_list_tag\",\r\n Value = \"m2_list_tag_value\",\r\n };\r\n\r\n var listType = new PropertyDefinition\r\n {\r\n Key = \"m2_web_type\",\r\n Value = \"m2_web_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list\r\n .AddProperty(listTag)\r\n .AddProperty(listType);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PropertyDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add property to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPropertyBagUnderFolder()\r\n {\r\n var folderTag = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_tag\",\r\n Value = \"m2_folder_tag_value\",\r\n };\r\n\r\n var folderType = new PropertyDefinition\r\n {\r\n Key = \"m2_folder_type\",\r\n Value = \"m2_folder_type_value\",\r\n };\r\n\r\n var listWithProperties = new ListDefinition\r\n {\r\n Title = \"List with properties\",\r\n Description = \"List with some properties.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n Url = \"ListWithProperties\"\r\n };\r\n\r\n var fodlerWithProperties = new FolderDefinition\r\n {\r\n Name = \"folder with properties\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listWithProperties, list =>\r\n {\r\n list.AddFolder(fodlerWithProperties, folder =>\r\n {\r\n // Syntax miss - folder should support adding props #669\r\n // https://github.com/SubPointSolutions/spmeta2/issues/669\r\n\r\n //folder\r\n // .AddProperty(folderTag)\r\n // .AddProperty(folderType);\r\n\r\n folder\r\n .AddDefinitionNode(folderTag)\r\n .AddDefinitionNode(folderType);\r\n });\r\n\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PropertyDefinitionTests\r\n PropertyDefinitionTestsClass\r\n \r\n ClassPropertyDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PropertyDefinitionTests\r\n 0\r\n PropertyDefinitionTests.cs\r\n PropertyDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\PropertyDefinitionTests.cs\r\n"); } public static class QuickLaunchNavigationNodeDefinitionTests @@ -1103,43 +1139,43 @@ public static class QuickLaunchNavigationNodeDefinitionTests public static class RegionalSettingsDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add regional settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RegionalSettingsDefinitionTests\r\n CanDeploySimpleRegionalSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests.CanDeploySimpleRegionalSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests\r\n 0\r\n RegionalSettingsDefinitionTests.cs\r\n RegionalSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RegionalSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n RegionalSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RegionalSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RegionalSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add regional settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RegionalSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RegionalSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add regional settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RegionalSettingsDefinitionTests\r\n RegionalSettingsDefinitionTestsClass\r\n \r\n ClassRegionalSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests\r\n 0\r\n RegionalSettingsDefinitionTests.cs\r\n RegionalSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RegionalSettingsDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add regional settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RegionalSettingsDefinitionTests\r\n CanDeploySimpleRegionalSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests.CanDeploySimpleRegionalSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests\r\n 0\r\n RegionalSettingsDefinitionTests.cs\r\n RegionalSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RegionalSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n RegionalSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RegionalSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RegionalSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add regional settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RegionalSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RegionalSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add regional settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RegionalSettingsDefinitionTests\r\n RegionalSettingsDefinitionTestsClass\r\n \r\n ClassRegionalSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests\r\n 0\r\n RegionalSettingsDefinitionTests.cs\r\n RegionalSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RegionalSettingsDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleRegionalSettingsDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add regional settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RegionalSettingsDefinitionTests\r\n CanDeploySimpleRegionalSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests.CanDeploySimpleRegionalSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests\r\n 0\r\n RegionalSettingsDefinitionTests.cs\r\n RegionalSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RegionalSettingsDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample RegionalSettingsDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n RegionalSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RegionalSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RegionalSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add regional settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RegionalSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RegionalSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add regional settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RegionalSettingsDefinitionTests\r\n RegionalSettingsDefinitionTestsClass\r\n \r\n ClassRegionalSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests\r\n 0\r\n RegionalSettingsDefinitionTests.cs\r\n RegionalSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RegionalSettingsDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleRegionalSettingsDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add regional settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RegionalSettingsDefinitionTests\r\n CanDeploySimpleRegionalSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests.CanDeploySimpleRegionalSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests\r\n 0\r\n RegionalSettingsDefinitionTests.cs\r\n RegionalSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RegionalSettingsDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample RegionalSettingsDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n RegionalSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RegionalSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RegionalSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add regional settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RegionalSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RegionalSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add regional settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleRegionalSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RegionalSettingsDefinitionTests\r\n RegionalSettingsDefinitionTestsClass\r\n \r\n ClassRegionalSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RegionalSettingsDefinitionTests\r\n 0\r\n RegionalSettingsDefinitionTests.cs\r\n RegionalSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RegionalSettingsDefinitionTests.cs\r\n"); } public static class RemoveContentTypeFieldLinksDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Remove fields from content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customName = new TextFieldDefinition\r\n{\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n};\r\n\r\nvar customObjectContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n CanRemoveContentTypeFieldLink\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests.CanRemoveContentTypeFieldLink\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests\r\n 0\r\n RemoveContentTypeFieldLinksDefinitionTests.cs\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeFieldLinksDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n RemoveContentTypeFieldLinksDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RemoveContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove fields from content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RemoveContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove fields from content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n RemoveContentTypeFieldLinksDefinitionTestsClass\r\n \r\n ClassRemoveContentTypeFieldLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests\r\n 0\r\n RemoveContentTypeFieldLinksDefinitionTests.cs\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeFieldLinksDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Remove fields from content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customName = new TextFieldDefinition\r\n{\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n};\r\n\r\nvar customObjectContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n CanRemoveContentTypeFieldLink\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests.CanRemoveContentTypeFieldLink\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests\r\n 0\r\n RemoveContentTypeFieldLinksDefinitionTests.cs\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeFieldLinksDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n RemoveContentTypeFieldLinksDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RemoveContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove fields from content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RemoveContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove fields from content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n RemoveContentTypeFieldLinksDefinitionTestsClass\r\n \r\n ClassRemoveContentTypeFieldLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests\r\n 0\r\n RemoveContentTypeFieldLinksDefinitionTests.cs\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeFieldLinksDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanRemoveContentTypeFieldLink = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Remove fields from content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customName = new TextFieldDefinition\r\n{\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n};\r\n\r\nvar customObjectContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n CanRemoveContentTypeFieldLink\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests.CanRemoveContentTypeFieldLink\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests\r\n 0\r\n RemoveContentTypeFieldLinksDefinitionTests.cs\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeFieldLinksDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample RemoveContentTypeFieldLinksDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n RemoveContentTypeFieldLinksDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RemoveContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove fields from content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RemoveContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove fields from content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n RemoveContentTypeFieldLinksDefinitionTestsClass\r\n \r\n ClassRemoveContentTypeFieldLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests\r\n 0\r\n RemoveContentTypeFieldLinksDefinitionTests.cs\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeFieldLinksDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanRemoveContentTypeFieldLink = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Remove fields from content type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customName = new TextFieldDefinition\r\n{\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n};\r\n\r\nvar customObjectContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n CanRemoveContentTypeFieldLink\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests.CanRemoveContentTypeFieldLink\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests\r\n 0\r\n RemoveContentTypeFieldLinksDefinitionTests.cs\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeFieldLinksDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample RemoveContentTypeFieldLinksDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n RemoveContentTypeFieldLinksDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RemoveContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove fields from content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RemoveContentTypeFieldLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeFieldLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove fields from content type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFieldLink()\r\n {\r\n var customName = new TextFieldDefinition\r\n {\r\n Title = \"Custom Name\",\r\n InternalName = \"m2_CustomName\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"8EE0C5C6-BD47-4111-9707-660B737F9F9B\"),\r\n };\r\n\r\n var customObjectContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Custom Object\",\r\n Id = new Guid(\"C6F60CBE-48AE-434D-955C-7A45DC32AD9A\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(customName)\r\n .AddContentType(customObjectContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(customName)\r\n .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue {Id = BuiltInFieldId.Title}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n RemoveContentTypeFieldLinksDefinitionTestsClass\r\n \r\n ClassRemoveContentTypeFieldLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeFieldLinksDefinitionTests\r\n 0\r\n RemoveContentTypeFieldLinksDefinitionTests.cs\r\n RemoveContentTypeFieldLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeFieldLinksDefinitionTests.cs\r\n"); } public static class RemoveContentTypeLinksDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Remove content types from lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var defaultReport = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar defaultReportsList = new ListDefinition\r\n{\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(defaultReport);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeLinksDefinitionTests\r\n CanRemoveContentTypeFromList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests.CanRemoveContentTypeFromList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests\r\n 0\r\n RemoveContentTypeLinksDefinitionTests.cs\r\n RemoveContentTypeLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeLinksDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n RemoveContentTypeLinksDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RemoveContentTypeLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove content types from lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RemoveContentTypeLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove content types from lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeLinksDefinitionTests\r\n RemoveContentTypeLinksDefinitionTestsClass\r\n \r\n ClassRemoveContentTypeLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests\r\n 0\r\n RemoveContentTypeLinksDefinitionTests.cs\r\n RemoveContentTypeLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeLinksDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Remove content types from lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var defaultReport = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar defaultReportsList = new ListDefinition\r\n{\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(defaultReport);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeLinksDefinitionTests\r\n CanRemoveContentTypeFromList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests.CanRemoveContentTypeFromList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests\r\n 0\r\n RemoveContentTypeLinksDefinitionTests.cs\r\n RemoveContentTypeLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeLinksDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n RemoveContentTypeLinksDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RemoveContentTypeLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove content types from lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RemoveContentTypeLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove content types from lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeLinksDefinitionTests\r\n RemoveContentTypeLinksDefinitionTestsClass\r\n \r\n ClassRemoveContentTypeLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests\r\n 0\r\n RemoveContentTypeLinksDefinitionTests.cs\r\n RemoveContentTypeLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeLinksDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanRemoveContentTypeFromList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Remove content types from lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var defaultReport = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar defaultReportsList = new ListDefinition\r\n{\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(defaultReport);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeLinksDefinitionTests\r\n CanRemoveContentTypeFromList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests.CanRemoveContentTypeFromList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests\r\n 0\r\n RemoveContentTypeLinksDefinitionTests.cs\r\n RemoveContentTypeLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeLinksDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample RemoveContentTypeLinksDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n RemoveContentTypeLinksDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RemoveContentTypeLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove content types from lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RemoveContentTypeLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove content types from lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeLinksDefinitionTests\r\n RemoveContentTypeLinksDefinitionTestsClass\r\n \r\n ClassRemoveContentTypeLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests\r\n 0\r\n RemoveContentTypeLinksDefinitionTests.cs\r\n RemoveContentTypeLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeLinksDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanRemoveContentTypeFromList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Remove content types from lists\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var defaultReport = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar defaultReportsList = new ListDefinition\r\n{\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(defaultReport);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeLinksDefinitionTests\r\n CanRemoveContentTypeFromList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests.CanRemoveContentTypeFromList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests\r\n 0\r\n RemoveContentTypeLinksDefinitionTests.cs\r\n RemoveContentTypeLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeLinksDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample RemoveContentTypeLinksDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n RemoveContentTypeLinksDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class RemoveContentTypeLinksDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove content types from lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class RemoveContentTypeLinksDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.RemoveContentTypeLinksDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Remove content types from lists\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanRemoveContentTypeFromList()\r\n {\r\n var defaultReport = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Default Report\",\r\n Id = new Guid(\"E2134FA1-254A-41AF-8BB0-A0A521722832\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var defaultReportsList = new ListDefinition\r\n {\r\n Title = \"M2 Default Reports\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2DefaultReports\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(defaultReport);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(defaultReportsList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(defaultReport)\r\n .AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = \"Item\"}\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n RemoveContentTypeLinksDefinitionTests\r\n RemoveContentTypeLinksDefinitionTestsClass\r\n \r\n ClassRemoveContentTypeLinksDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.RemoveContentTypeLinksDefinitionTests\r\n 0\r\n RemoveContentTypeLinksDefinitionTests.cs\r\n RemoveContentTypeLinksDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\RemoveContentTypeLinksDefinitionTests.cs\r\n"); } public static class ResetRoleInheritanceDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Reset role inheritance on list\r\n \r\n \r\n \r\n\r\n\r\n \r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listDef = new ListDefinition\r\n{\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n CanDeployResetRoleInheritanceDefinition_OnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests.CanDeployResetRoleInheritanceDefinition_OnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Reset role inheritance on web\r\n \r\n \r\n \r\n\r\n\r\n \r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var publicProjectWebDef = new WebDefinition\r\n{\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n CanDeployResetRoleInheritanceDefinition_OnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests.CanDeployResetRoleInheritanceDefinition_OnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n ResetRoleInheritanceDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ResetRoleInheritanceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ResetRoleInheritanceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n ResetRoleInheritanceDefinitionTestsClass\r\n \r\n ClassResetRoleInheritanceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Reset role inheritance on list\r\n \r\n \r\n \r\n\r\n\r\n \r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listDef = new ListDefinition\r\n{\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n CanDeployResetRoleInheritanceDefinition_OnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests.CanDeployResetRoleInheritanceDefinition_OnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Reset role inheritance on web\r\n \r\n \r\n \r\n\r\n\r\n \r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var publicProjectWebDef = new WebDefinition\r\n{\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n CanDeployResetRoleInheritanceDefinition_OnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests.CanDeployResetRoleInheritanceDefinition_OnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n ResetRoleInheritanceDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ResetRoleInheritanceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ResetRoleInheritanceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n ResetRoleInheritanceDefinitionTestsClass\r\n \r\n ClassResetRoleInheritanceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployResetRoleInheritanceDefinition_OnList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Reset role inheritance on list\r\n \r\n \r\n \r\n\r\n\r\n \r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listDef = new ListDefinition\r\n{\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n CanDeployResetRoleInheritanceDefinition_OnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests.CanDeployResetRoleInheritanceDefinition_OnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployResetRoleInheritanceDefinition_OnWeb = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Reset role inheritance on web\r\n \r\n \r\n \r\n\r\n\r\n \r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var publicProjectWebDef = new WebDefinition\r\n{\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n CanDeployResetRoleInheritanceDefinition_OnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests.CanDeployResetRoleInheritanceDefinition_OnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ResetRoleInheritanceDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n ResetRoleInheritanceDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ResetRoleInheritanceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ResetRoleInheritanceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n ResetRoleInheritanceDefinitionTestsClass\r\n \r\n ClassResetRoleInheritanceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployResetRoleInheritanceDefinition_OnList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Reset role inheritance on list\r\n \r\n \r\n \r\n\r\n\r\n \r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var listDef = new ListDefinition\r\n{\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n CanDeployResetRoleInheritanceDefinition_OnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests.CanDeployResetRoleInheritanceDefinition_OnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployResetRoleInheritanceDefinition_OnWeb = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Reset role inheritance on web\r\n \r\n \r\n \r\n\r\n\r\n \r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var publicProjectWebDef = new WebDefinition\r\n{\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n CanDeployResetRoleInheritanceDefinition_OnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests.CanDeployResetRoleInheritanceDefinition_OnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ResetRoleInheritanceDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n ResetRoleInheritanceDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ResetRoleInheritanceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ResetRoleInheritanceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on list\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnList()\r\n {\r\n var listDef = new ListDefinition\r\n {\r\n Title = \"Public records\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n CustomUrl = \"lists/public-records\",\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(listDef, list =>\r\n {\r\n list.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), resetList =>\r\n {\r\n // resetList is your list but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // resetList.AddListView(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ResetRoleInheritanceDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Reset role inheritance on web\",\r\n Description = \"\"\r\n )]\r\n public void CanDeployResetRoleInheritanceDefinition_OnWeb()\r\n {\r\n var publicProjectWebDef = new WebDefinition\r\n {\r\n Title = \"Public project\",\r\n Url = \"public-project\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(publicProjectWebDef, publicProjectWeb =>\r\n {\r\n publicProjectWeb.AddResetRoleInheritance(new ResetRoleInheritanceDefinition(), publicProjectResetWeb =>\r\n {\r\n // publicProjectResetWeb is your web but after resetting role inheritance\r\n // build your model as usual\r\n\r\n // publicProjectResetWeb.AddList(...)\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ResetRoleInheritanceDefinitionTests\r\n ResetRoleInheritanceDefinitionTestsClass\r\n \r\n ClassResetRoleInheritanceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ResetRoleInheritanceDefinitionTests\r\n 0\r\n ResetRoleInheritanceDefinitionTests.cs\r\n ResetRoleInheritanceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ResetRoleInheritanceDefinitionTests.cs\r\n"); } public static class RootWebDefinitionTests @@ -1157,67 +1193,67 @@ public static class RootWebDefinitionTests public static class SandboxSolutionDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add sandbox solution\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n \r\n // Content is a byte array, so get ot from whatever source you want\r\n \r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n \r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // FileName could be different to the original solution name\r\n// FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n\r\n// Content is a byte array, so get ot from whatever source you want\r\n\r\n// SolutionId is used to lookup existing sandbox package\r\n// get SolutionId from the VS project or XML inside WSP package\r\n\r\n// Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\nvar myBranding = new SandboxSolutionDefinition\r\n{\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n};\r\n\r\nvar myTasks = new SandboxSolutionDefinition\r\n{\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SandboxSolutionDefinitionTests\r\n CanDeploySimpleSandboxSolutionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests.CanDeploySimpleSandboxSolutionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests\r\n 0\r\n SandboxSolutionDefinitionTests.cs\r\n SandboxSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SandboxSolutionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n SandboxSolutionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SandboxSolutionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SandboxSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add sandbox solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n \r\n // Content is a byte array, so get ot from whatever source you want\r\n \r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n \r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SandboxSolutionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SandboxSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add sandbox solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n\r\n // Content is a byte array, so get ot from whatever source you want\r\n\r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n\r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SandboxSolutionDefinitionTests\r\n SandboxSolutionDefinitionTestsClass\r\n \r\n ClassSandboxSolutionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests\r\n 0\r\n SandboxSolutionDefinitionTests.cs\r\n SandboxSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SandboxSolutionDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add sandbox solution\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n \r\n // Content is a byte array, so get ot from whatever source you want\r\n \r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n \r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // FileName could be different to the original solution name\r\n// FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n\r\n// Content is a byte array, so get ot from whatever source you want\r\n\r\n// SolutionId is used to lookup existing sandbox package\r\n// get SolutionId from the VS project or XML inside WSP package\r\n\r\n// Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\nvar myBranding = new SandboxSolutionDefinition\r\n{\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n};\r\n\r\nvar myTasks = new SandboxSolutionDefinition\r\n{\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SandboxSolutionDefinitionTests\r\n CanDeploySimpleSandboxSolutionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests.CanDeploySimpleSandboxSolutionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests\r\n 0\r\n SandboxSolutionDefinitionTests.cs\r\n SandboxSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SandboxSolutionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SandboxSolutionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SandboxSolutionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SandboxSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add sandbox solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n \r\n // Content is a byte array, so get ot from whatever source you want\r\n \r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n \r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SandboxSolutionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SandboxSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add sandbox solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n\r\n // Content is a byte array, so get ot from whatever source you want\r\n\r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n\r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SandboxSolutionDefinitionTests\r\n SandboxSolutionDefinitionTestsClass\r\n \r\n ClassSandboxSolutionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests\r\n 0\r\n SandboxSolutionDefinitionTests.cs\r\n SandboxSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SandboxSolutionDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSandboxSolutionDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add sandbox solution\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n \r\n // Content is a byte array, so get ot from whatever source you want\r\n \r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n \r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // FileName could be different to the original solution name\r\n// FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n\r\n// Content is a byte array, so get ot from whatever source you want\r\n\r\n// SolutionId is used to lookup existing sandbox package\r\n// get SolutionId from the VS project or XML inside WSP package\r\n\r\n// Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\nvar myBranding = new SandboxSolutionDefinition\r\n{\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n};\r\n\r\nvar myTasks = new SandboxSolutionDefinition\r\n{\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SandboxSolutionDefinitionTests\r\n CanDeploySimpleSandboxSolutionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests.CanDeploySimpleSandboxSolutionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests\r\n 0\r\n SandboxSolutionDefinitionTests.cs\r\n SandboxSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SandboxSolutionDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample SandboxSolutionDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n SandboxSolutionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SandboxSolutionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SandboxSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add sandbox solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n \r\n // Content is a byte array, so get ot from whatever source you want\r\n \r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n \r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SandboxSolutionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SandboxSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add sandbox solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n\r\n // Content is a byte array, so get ot from whatever source you want\r\n\r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n\r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SandboxSolutionDefinitionTests\r\n SandboxSolutionDefinitionTestsClass\r\n \r\n ClassSandboxSolutionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests\r\n 0\r\n SandboxSolutionDefinitionTests.cs\r\n SandboxSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SandboxSolutionDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSandboxSolutionDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add sandbox solution\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n \r\n // Content is a byte array, so get ot from whatever source you want\r\n \r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n \r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // FileName could be different to the original solution name\r\n// FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n\r\n// Content is a byte array, so get ot from whatever source you want\r\n\r\n// SolutionId is used to lookup existing sandbox package\r\n// get SolutionId from the VS project or XML inside WSP package\r\n\r\n// Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\nvar myBranding = new SandboxSolutionDefinition\r\n{\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n};\r\n\r\nvar myTasks = new SandboxSolutionDefinition\r\n{\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SandboxSolutionDefinitionTests\r\n CanDeploySimpleSandboxSolutionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests.CanDeploySimpleSandboxSolutionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests\r\n 0\r\n SandboxSolutionDefinitionTests.cs\r\n SandboxSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SandboxSolutionDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample SandboxSolutionDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SandboxSolutionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SandboxSolutionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SandboxSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add sandbox solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n \r\n // Content is a byte array, so get ot from whatever source you want\r\n \r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n \r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SandboxSolutionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SandboxSolutionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add sandbox solution\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSandboxSolutionDefinition()\r\n {\r\n // FileName could be different to the original solution name\r\n // FileName must not have \".\" to avoid fails (DesignPackage API limitations)\r\n\r\n // Content is a byte array, so get ot from whatever source you want\r\n\r\n // SolutionId is used to lookup existing sandbox package\r\n // get SolutionId from the VS project or XML inside WSP package\r\n\r\n // Activate must be always true for CSOM (DesignPackage API limitations)\r\n\r\n var myBranding = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyBranding.wsp\",\r\n Content = File.ReadAllBytes(\"MySandboxBranding.wsp\"),\r\n SolutionId = new Guid(\"0CDCC076-A472-4DD9-9A1F-0E1E761ED61D\"),\r\n Activate = true,\r\n };\r\n\r\n var myTasks = new SandboxSolutionDefinition\r\n {\r\n FileName = \"MyTasks.wsp\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"MyIntranet.Resources.MyTasks.wsp\"),\r\n SolutionId = new Guid(\"3D279748-92FC-49F9-A6C5-A10FBCD2DB24\"),\r\n Activate = true,\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSandboxSolution(myBranding)\r\n .AddSandboxSolution(myTasks);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SandboxSolutionDefinitionTests\r\n SandboxSolutionDefinitionTestsClass\r\n \r\n ClassSandboxSolutionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SandboxSolutionDefinitionTests\r\n 0\r\n SandboxSolutionDefinitionTests.cs\r\n SandboxSolutionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SandboxSolutionDefinitionTests.cs\r\n"); } public static class ScriptEditorWebPartDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add Script Editor web part\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n{\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n CanDeploySimpleScriptEditorWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests.CanDeploySimpleScriptEditorWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add Script Editor web part with content\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n{\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n CanDeployScriptEditorWebPartwithContent\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests.CanDeployScriptEditorWebPartwithContent\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ScriptEditorWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ScriptEditorWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ScriptEditorWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n ScriptEditorWebPartDefinitionTestsClass\r\n \r\n ClassScriptEditorWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add Script Editor web part\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n{\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n CanDeploySimpleScriptEditorWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests.CanDeploySimpleScriptEditorWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add Script Editor web part with content\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n{\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n CanDeployScriptEditorWebPartwithContent\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests.CanDeployScriptEditorWebPartwithContent\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ScriptEditorWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ScriptEditorWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ScriptEditorWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n ScriptEditorWebPartDefinitionTestsClass\r\n \r\n ClassScriptEditorWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleScriptEditorWebPartDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add Script Editor web part\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n{\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n CanDeploySimpleScriptEditorWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests.CanDeploySimpleScriptEditorWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployScriptEditorWebPartwithContent = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add Script Editor web part with content\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n{\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n CanDeployScriptEditorWebPartwithContent\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests.CanDeployScriptEditorWebPartwithContent\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ScriptEditorWebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ScriptEditorWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ScriptEditorWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ScriptEditorWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n ScriptEditorWebPartDefinitionTestsClass\r\n \r\n ClassScriptEditorWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleScriptEditorWebPartDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add Script Editor web part\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n{\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n CanDeploySimpleScriptEditorWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests.CanDeploySimpleScriptEditorWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployScriptEditorWebPartwithContent = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add Script Editor web part with content\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n{\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n CanDeployScriptEditorWebPartwithContent\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests.CanDeployScriptEditorWebPartwithContent\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ScriptEditorWebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ScriptEditorWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ScriptEditorWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ScriptEditorWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleScriptEditorWebPartDefinition()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Empty Script Editor\",\r\n Id = \"m2EmptyScriptEditorrWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ScriptEditorWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Script Editor web part with content\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployScriptEditorWebPartwithContent()\r\n {\r\n var scriptEditor = new ScriptEditorWebPartDefinition\r\n {\r\n Title = \"Pre-provisioned Script Editor\",\r\n Id = \"m2ScriptEditorWithLoggerWhichMustBeMoreThan32Chars\",\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\",\r\n Content = \" <script> console.log(\'script editor log\'); </script> Pre-provisioned Script Editor Content\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Script Editor provision\",\r\n FileName = \"script-editor-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddScriptEditorWebPart(scriptEditor);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ScriptEditorWebPartDefinitionTests\r\n ScriptEditorWebPartDefinitionTestsClass\r\n \r\n ClassScriptEditorWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ScriptEditorWebPartDefinitionTests\r\n 0\r\n ScriptEditorWebPartDefinitionTests.cs\r\n ScriptEditorWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\ScriptEditorWebPartDefinitionTests.cs\r\n"); } public static class SecureStoreApplicationDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add secure store application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecureStoreApplicationDefinitionTests\r\n CanDeploySimpleSecureStoreApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests.CanDeploySimpleSecureStoreApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests\r\n 0\r\n SecureStoreApplicationDefinitionTests.cs\r\n SecureStoreApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecureStoreApplicationDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SecureStoreApplicationDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class SecureStoreApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecureStoreApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add secure store application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class SecureStoreApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecureStoreApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add secure store application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecureStoreApplicationDefinitionTests\r\n SecureStoreApplicationDefinitionTestsClass\r\n \r\n ClassSecureStoreApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests\r\n 0\r\n SecureStoreApplicationDefinitionTests.cs\r\n SecureStoreApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecureStoreApplicationDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add secure store application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecureStoreApplicationDefinitionTests\r\n CanDeploySimpleSecureStoreApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests.CanDeploySimpleSecureStoreApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests\r\n 0\r\n SecureStoreApplicationDefinitionTests.cs\r\n SecureStoreApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecureStoreApplicationDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SecureStoreApplicationDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class SecureStoreApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecureStoreApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add secure store application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class SecureStoreApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecureStoreApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add secure store application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecureStoreApplicationDefinitionTests\r\n SecureStoreApplicationDefinitionTestsClass\r\n \r\n ClassSecureStoreApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests\r\n 0\r\n SecureStoreApplicationDefinitionTests.cs\r\n SecureStoreApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecureStoreApplicationDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSecureStoreApplicationDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add secure store application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecureStoreApplicationDefinitionTests\r\n CanDeploySimpleSecureStoreApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests.CanDeploySimpleSecureStoreApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests\r\n 0\r\n SecureStoreApplicationDefinitionTests.cs\r\n SecureStoreApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecureStoreApplicationDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample SecureStoreApplicationDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SecureStoreApplicationDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class SecureStoreApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecureStoreApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add secure store application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class SecureStoreApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecureStoreApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add secure store application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecureStoreApplicationDefinitionTests\r\n SecureStoreApplicationDefinitionTestsClass\r\n \r\n ClassSecureStoreApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests\r\n 0\r\n SecureStoreApplicationDefinitionTests.cs\r\n SecureStoreApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecureStoreApplicationDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSecureStoreApplicationDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add secure store application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecureStoreApplicationDefinitionTests\r\n CanDeploySimpleSecureStoreApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests.CanDeploySimpleSecureStoreApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests\r\n 0\r\n SecureStoreApplicationDefinitionTests.cs\r\n SecureStoreApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecureStoreApplicationDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample SecureStoreApplicationDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SecureStoreApplicationDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class SecureStoreApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecureStoreApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add secure store application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class SecureStoreApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecureStoreApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add secure store application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecureStoreApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecureStoreApplicationDefinitionTests\r\n SecureStoreApplicationDefinitionTestsClass\r\n \r\n ClassSecureStoreApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecureStoreApplicationDefinitionTests\r\n 0\r\n SecureStoreApplicationDefinitionTests.cs\r\n SecureStoreApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecureStoreApplicationDefinitionTests.cs\r\n"); } public static class SecurityGroupDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add security group\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\nvar reviewers = new SecurityGroupDefinition\r\n{\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n CanDeploySimpleSecurityGroup\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests.CanDeploySimpleSecurityGroup\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add multiple security groups\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n CanDeploySimpleSecurityGroups\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests.CanDeploySimpleSecurityGroups\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n SecurityGroupDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SecurityGroupDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add multiple security groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SecurityGroupDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add multiple security groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n SecurityGroupDefinitionTestsClass\r\n \r\n ClassSecurityGroupDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Add security group\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\nvar reviewers = new SecurityGroupDefinition\r\n{\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n CanDeploySimpleSecurityGroup\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests.CanDeploySimpleSecurityGroup\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Add multiple security groups\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n CanDeploySimpleSecurityGroups\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests.CanDeploySimpleSecurityGroups\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n SecurityGroupDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SecurityGroupDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add multiple security groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SecurityGroupDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add multiple security groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n SecurityGroupDefinitionTestsClass\r\n \r\n ClassSecurityGroupDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSecurityGroup = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add security group\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\nvar reviewers = new SecurityGroupDefinition\r\n{\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n CanDeploySimpleSecurityGroup\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests.CanDeploySimpleSecurityGroup\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSecurityGroups = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add multiple security groups\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n CanDeploySimpleSecurityGroups\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests.CanDeploySimpleSecurityGroups\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample SecurityGroupDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n SecurityGroupDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SecurityGroupDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add multiple security groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SecurityGroupDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add multiple security groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n SecurityGroupDefinitionTestsClass\r\n \r\n ClassSecurityGroupDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSecurityGroup = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Add security group\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\nvar reviewers = new SecurityGroupDefinition\r\n{\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n CanDeploySimpleSecurityGroup\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests.CanDeploySimpleSecurityGroup\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSecurityGroups = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Add multiple security groups\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n CanDeploySimpleSecurityGroups\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests.CanDeploySimpleSecurityGroups\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample SecurityGroupDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n SecurityGroupDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SecurityGroupDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add multiple security groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SecurityGroupDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroup()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var reviewers = new SecurityGroupDefinition\r\n {\r\n Name = \"External Reviewers\",\r\n Description = \"External reviewers group.\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(auditors)\r\n .AddSecurityGroup(reviewers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add multiple security groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroups()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityGroup(DocSecurityGroups.ClientManagers)\r\n .AddSecurityGroup(DocSecurityGroups.ClientSupport)\r\n .AddSecurityGroup(DocSecurityGroups.Interns)\r\n .AddSecurityGroup(DocSecurityGroups.OrderApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupDefinitionTests\r\n SecurityGroupDefinitionTestsClass\r\n \r\n ClassSecurityGroupDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupDefinitionTests\r\n 0\r\n SecurityGroupDefinitionTests.cs\r\n SecurityGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupDefinitionTests.cs\r\n"); } public static class SecurityGroupLinkDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Assign security group to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\n// add group to the site first\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(auditors);\r\n});\r\n\r\n// assign group to the web, via .AddSecurityGroupLink() method\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n CanDeploySimpleSecurityGroupLinkDefinitionToWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests.CanDeploySimpleSecurityGroupLinkDefinitionToWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Assign security group to list\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\nvar auditorsList = new ListDefinition\r\n{\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n};\r\n\r\n// add group to the site first\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(auditors);\r\n});\r\n\r\n// assign group to the list, via .AddSecurityGroupLink() method\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n CanDeploySimpleSecurityGroupLinkDefinitionToList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests.CanDeploySimpleSecurityGroupLinkDefinitionToList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SecurityGroupLinkDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class SecurityGroupLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Assign security group to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n [SampleMetadata(Title = \"Assign security group to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class SecurityGroupLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Assign security group to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n [SampleMetadata(Title = \"Assign security group to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n SecurityGroupLinkDefinitionTestsClass\r\n \r\n ClassSecurityGroupLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Assign security group to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\n// add group to the site first\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(auditors);\r\n});\r\n\r\n// assign group to the web, via .AddSecurityGroupLink() method\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n CanDeploySimpleSecurityGroupLinkDefinitionToWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests.CanDeploySimpleSecurityGroupLinkDefinitionToWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Assign security group to list\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\nvar auditorsList = new ListDefinition\r\n{\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n};\r\n\r\n// add group to the site first\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(auditors);\r\n});\r\n\r\n// assign group to the list, via .AddSecurityGroupLink() method\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n CanDeploySimpleSecurityGroupLinkDefinitionToList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests.CanDeploySimpleSecurityGroupLinkDefinitionToList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SecurityGroupLinkDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class SecurityGroupLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Assign security group to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n [SampleMetadata(Title = \"Assign security group to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class SecurityGroupLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Assign security group to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n [SampleMetadata(Title = \"Assign security group to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n SecurityGroupLinkDefinitionTestsClass\r\n \r\n ClassSecurityGroupLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSecurityGroupLinkDefinitionToWeb = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Assign security group to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\n// add group to the site first\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(auditors);\r\n});\r\n\r\n// assign group to the web, via .AddSecurityGroupLink() method\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n CanDeploySimpleSecurityGroupLinkDefinitionToWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests.CanDeploySimpleSecurityGroupLinkDefinitionToWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSecurityGroupLinkDefinitionToList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Assign security group to list\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\nvar auditorsList = new ListDefinition\r\n{\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n};\r\n\r\n// add group to the site first\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(auditors);\r\n});\r\n\r\n// assign group to the list, via .AddSecurityGroupLink() method\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n CanDeploySimpleSecurityGroupLinkDefinitionToList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests.CanDeploySimpleSecurityGroupLinkDefinitionToList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample SecurityGroupLinkDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SecurityGroupLinkDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class SecurityGroupLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Assign security group to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n [SampleMetadata(Title = \"Assign security group to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class SecurityGroupLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Assign security group to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n [SampleMetadata(Title = \"Assign security group to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n SecurityGroupLinkDefinitionTestsClass\r\n \r\n ClassSecurityGroupLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSecurityGroupLinkDefinitionToWeb = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Assign security group to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\n// add group to the site first\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(auditors);\r\n});\r\n\r\n// assign group to the web, via .AddSecurityGroupLink() method\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n CanDeploySimpleSecurityGroupLinkDefinitionToWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests.CanDeploySimpleSecurityGroupLinkDefinitionToWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSecurityGroupLinkDefinitionToList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Assign security group to list\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var auditors = new SecurityGroupDefinition\r\n{\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n};\r\n\r\nvar auditorsList = new ListDefinition\r\n{\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n};\r\n\r\n// add group to the site first\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSecurityGroup(auditors);\r\n});\r\n\r\n// assign group to the list, via .AddSecurityGroupLink() method\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n CanDeploySimpleSecurityGroupLinkDefinitionToList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests.CanDeploySimpleSecurityGroupLinkDefinitionToList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample SecurityGroupLinkDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SecurityGroupLinkDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class SecurityGroupLinkDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Assign security group to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n [SampleMetadata(Title = \"Assign security group to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class SecurityGroupLinkDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityGroupLinkDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Assign security group to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToWeb()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the web, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n\r\n web.AddSecurityGroupLink(auditors);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n [SampleMetadata(Title = \"Assign security group to list\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSecurityGroupLinkDefinitionToList()\r\n {\r\n var auditors = new SecurityGroupDefinition\r\n {\r\n Name = \"External Auditors\",\r\n Description = \"External auditors group.\"\r\n };\r\n\r\n var auditorsList = new ListDefinition\r\n {\r\n Title = \"Auditors documents\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n CustomUrl = \"audit-docs\"\r\n };\r\n\r\n // add group to the site first\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSecurityGroup(auditors);\r\n });\r\n\r\n // assign group to the list, via .AddSecurityGroupLink() method\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(auditorsList, list =>\r\n {\r\n list.AddSecurityGroupLink(auditors);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityGroupLinkDefinitionTests\r\n SecurityGroupLinkDefinitionTestsClass\r\n \r\n ClassSecurityGroupLinkDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityGroupLinkDefinitionTests\r\n 0\r\n SecurityGroupLinkDefinitionTests.cs\r\n SecurityGroupLinkDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityGroupLinkDefinitionTests.cs\r\n"); } public static class SecurityRoleDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Add security role\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customerEditors = new SecurityRoleDefinition\r\n{\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n};\r\n\r\nvar customerApprovers = new SecurityRoleDefinition\r\n{\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityRoleDefinitionTests\r\n CanDeploySimpleSecurityRoleDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests.CanDeploySimpleSecurityRoleDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests\r\n 0\r\n SecurityRoleDefinitionTests.cs\r\n SecurityRoleDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityRoleDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n SecurityRoleDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SecurityRoleDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityRoleDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security role\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SecurityRoleDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityRoleDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security role\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityRoleDefinitionTests\r\n SecurityRoleDefinitionTestsClass\r\n \r\n ClassSecurityRoleDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests\r\n 0\r\n SecurityRoleDefinitionTests.cs\r\n SecurityRoleDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityRoleDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add security role\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customerEditors = new SecurityRoleDefinition\r\n{\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n};\r\n\r\nvar customerApprovers = new SecurityRoleDefinition\r\n{\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityRoleDefinitionTests\r\n CanDeploySimpleSecurityRoleDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests.CanDeploySimpleSecurityRoleDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests\r\n 0\r\n SecurityRoleDefinitionTests.cs\r\n SecurityRoleDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityRoleDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SecurityRoleDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SecurityRoleDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityRoleDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security role\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SecurityRoleDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityRoleDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security role\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityRoleDefinitionTests\r\n SecurityRoleDefinitionTestsClass\r\n \r\n ClassSecurityRoleDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests\r\n 0\r\n SecurityRoleDefinitionTests.cs\r\n SecurityRoleDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityRoleDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSecurityRoleDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Add security role\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customerEditors = new SecurityRoleDefinition\r\n{\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n};\r\n\r\nvar customerApprovers = new SecurityRoleDefinition\r\n{\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityRoleDefinitionTests\r\n CanDeploySimpleSecurityRoleDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests.CanDeploySimpleSecurityRoleDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests\r\n 0\r\n SecurityRoleDefinitionTests.cs\r\n SecurityRoleDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityRoleDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample SecurityRoleDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n SecurityRoleDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SecurityRoleDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityRoleDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security role\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SecurityRoleDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityRoleDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security role\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityRoleDefinitionTests\r\n SecurityRoleDefinitionTestsClass\r\n \r\n ClassSecurityRoleDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests\r\n 0\r\n SecurityRoleDefinitionTests.cs\r\n SecurityRoleDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityRoleDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSecurityRoleDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add security role\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customerEditors = new SecurityRoleDefinition\r\n{\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n};\r\n\r\nvar customerApprovers = new SecurityRoleDefinition\r\n{\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityRoleDefinitionTests\r\n CanDeploySimpleSecurityRoleDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests.CanDeploySimpleSecurityRoleDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests\r\n 0\r\n SecurityRoleDefinitionTests.cs\r\n SecurityRoleDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityRoleDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample SecurityRoleDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Security\r\n Security\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SecurityRoleDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SecurityRoleDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityRoleDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security role\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SecurityRoleDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SecurityRoleDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add security role\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeploySimpleSecurityRoleDefinition()\r\n {\r\n var customerEditors = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer editors\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var customerApprovers = new SecurityRoleDefinition\r\n {\r\n Name = \"Customer approvers\",\r\n BasePermissions = new Collection<string>\r\n {\r\n BuiltInBasePermissions.EditListItems,\r\n BuiltInBasePermissions.DeleteListItems,\r\n BuiltInBasePermissions.UseClientIntegration\r\n }\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddSecurityRole(customerEditors)\r\n .AddSecurityRole(customerApprovers);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SecurityRoleDefinitionTests\r\n SecurityRoleDefinitionTestsClass\r\n \r\n ClassSecurityRoleDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SecurityRoleDefinitionTests\r\n 0\r\n SecurityRoleDefinitionTests.cs\r\n SecurityRoleDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SecurityRoleDefinitionTests.cs\r\n"); } public static class SecurityRoleLinkDefinitionTests @@ -1233,11 +1269,11 @@ public static class SecurityRoleLinkDefinitionTests public static class SiteDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add site\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteDefinitionTests\r\n CanDeploySimpleSiteDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests.CanDeploySimpleSiteDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests\r\n 0\r\n SiteDefinitionTests.cs\r\n SiteDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SiteDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n SiteDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SiteDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add site\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SiteDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add site\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteDefinitionTests\r\n SiteDefinitionTestsClass\r\n \r\n ClassSiteDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests\r\n 0\r\n SiteDefinitionTests.cs\r\n SiteDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SiteDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Add site\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteDefinitionTests\r\n CanDeploySimpleSiteDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests.CanDeploySimpleSiteDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests\r\n 0\r\n SiteDefinitionTests.cs\r\n SiteDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SiteDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n SiteDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SiteDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add site\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SiteDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add site\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteDefinitionTests\r\n SiteDefinitionTestsClass\r\n \r\n ClassSiteDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests\r\n 0\r\n SiteDefinitionTests.cs\r\n SiteDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SiteDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSiteDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add site\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteDefinitionTests\r\n CanDeploySimpleSiteDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests.CanDeploySimpleSiteDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests\r\n 0\r\n SiteDefinitionTests.cs\r\n SiteDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SiteDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample SiteDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n SiteDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SiteDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add site\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SiteDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add site\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteDefinitionTests\r\n SiteDefinitionTestsClass\r\n \r\n ClassSiteDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests\r\n 0\r\n SiteDefinitionTests.cs\r\n SiteDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SiteDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSiteDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Add site\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteDefinitionTests\r\n CanDeploySimpleSiteDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests.CanDeploySimpleSiteDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests\r\n 0\r\n SiteDefinitionTests.cs\r\n SiteDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SiteDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample SiteDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n SiteDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SiteDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add site\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SiteDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add site\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteDefinitionTests\r\n SiteDefinitionTestsClass\r\n \r\n ClassSiteDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteDefinitionTests\r\n 0\r\n SiteDefinitionTests.cs\r\n SiteDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\SiteDefinitionTests.cs\r\n"); } public static class SP2013WorkflowDefinitionTests @@ -1265,89 +1301,89 @@ public static class SP2013WorkflowSubscriptionDefinitionTests public static class TargetApplicationDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add Target Application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TargetApplicationDefinitionTests\r\n CanDeploySimpleTargetApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests.CanDeploySimpleTargetApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests\r\n 0\r\n TargetApplicationDefinitionTests.cs\r\n TargetApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TargetApplicationDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n TargetApplicationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TargetApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TargetApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Target Application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TargetApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TargetApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Target Application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TargetApplicationDefinitionTests\r\n TargetApplicationDefinitionTestsClass\r\n \r\n ClassTargetApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests\r\n 0\r\n TargetApplicationDefinitionTests.cs\r\n TargetApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TargetApplicationDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add Target Application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TargetApplicationDefinitionTests\r\n CanDeploySimpleTargetApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests.CanDeploySimpleTargetApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests\r\n 0\r\n TargetApplicationDefinitionTests.cs\r\n TargetApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TargetApplicationDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n TargetApplicationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TargetApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TargetApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Target Application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TargetApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TargetApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Target Application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TargetApplicationDefinitionTests\r\n TargetApplicationDefinitionTestsClass\r\n \r\n ClassTargetApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests\r\n 0\r\n TargetApplicationDefinitionTests.cs\r\n TargetApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TargetApplicationDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTargetApplicationDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add Target Application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TargetApplicationDefinitionTests\r\n CanDeploySimpleTargetApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests.CanDeploySimpleTargetApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests\r\n 0\r\n TargetApplicationDefinitionTests.cs\r\n TargetApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TargetApplicationDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample TargetApplicationDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n TargetApplicationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TargetApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TargetApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Target Application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TargetApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TargetApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Target Application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TargetApplicationDefinitionTests\r\n TargetApplicationDefinitionTestsClass\r\n \r\n ClassTargetApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests\r\n 0\r\n TargetApplicationDefinitionTests.cs\r\n TargetApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TargetApplicationDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTargetApplicationDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add Target Application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TargetApplicationDefinitionTests\r\n CanDeploySimpleTargetApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests.CanDeploySimpleTargetApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests\r\n 0\r\n TargetApplicationDefinitionTests.cs\r\n TargetApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TargetApplicationDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample TargetApplicationDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n TargetApplicationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TargetApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TargetApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Target Application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TargetApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TargetApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Target Application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTargetApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TargetApplicationDefinitionTests\r\n TargetApplicationDefinitionTestsClass\r\n \r\n ClassTargetApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TargetApplicationDefinitionTests\r\n 0\r\n TargetApplicationDefinitionTests.cs\r\n TargetApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TargetApplicationDefinitionTests.cs\r\n"); } public static class TextFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add text field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TextFieldDefinitionTests\r\n CanDeploySimpleTextFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests.CanDeploySimpleTextFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests\r\n 0\r\n TextFieldDefinitionTests.cs\r\n TextFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TextFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n TextFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TextFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TextFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add text field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TextFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TextFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add text field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TextFieldDefinitionTests\r\n TextFieldDefinitionTestsClass\r\n \r\n ClassTextFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests\r\n 0\r\n TextFieldDefinitionTests.cs\r\n TextFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TextFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add text field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TextFieldDefinitionTests\r\n CanDeploySimpleTextFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests.CanDeploySimpleTextFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests\r\n 0\r\n TextFieldDefinitionTests.cs\r\n TextFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TextFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n TextFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TextFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TextFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add text field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TextFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TextFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add text field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TextFieldDefinitionTests\r\n TextFieldDefinitionTestsClass\r\n \r\n ClassTextFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests\r\n 0\r\n TextFieldDefinitionTests.cs\r\n TextFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TextFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTextFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add text field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TextFieldDefinitionTests\r\n CanDeploySimpleTextFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests.CanDeploySimpleTextFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests\r\n 0\r\n TextFieldDefinitionTests.cs\r\n TextFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TextFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample TextFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n TextFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TextFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TextFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add text field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TextFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TextFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add text field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TextFieldDefinitionTests\r\n TextFieldDefinitionTestsClass\r\n \r\n ClassTextFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests\r\n 0\r\n TextFieldDefinitionTests.cs\r\n TextFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TextFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTextFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add text field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TextFieldDefinitionTests\r\n CanDeploySimpleTextFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests.CanDeploySimpleTextFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests\r\n 0\r\n TextFieldDefinitionTests.cs\r\n TextFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TextFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample TextFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n TextFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TextFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TextFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add text field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TextFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TextFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add text field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTextFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TextFieldDefinitionTests\r\n TextFieldDefinitionTestsClass\r\n \r\n ClassTextFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TextFieldDefinitionTests\r\n 0\r\n TextFieldDefinitionTests.cs\r\n TextFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TextFieldDefinitionTests.cs\r\n"); } public static class TopNavigationNodeDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n \r\n \r\n \r\n Add top nav items\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var ourCompany = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar ourServices = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar ourTeam = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n CaDeployFlatTopNavigation\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests.CaDeployFlatTopNavigation\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n \r\n \r\n \r\n Add hierarchical top nav items\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // top level departments node\r\nvar departments = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar hr = new TopNavigationNodeDefinition\r\n{\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar it = new TopNavigationNodeDefinition\r\n{\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\n// top level clients node\r\nvar partners = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar microsoft = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar apple = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n CaDeployHierarchicalTopNavigation\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests.CaDeployHierarchicalTopNavigation\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n Navigation\r\n \r\n \r\n \r\n TopNavigationNodeDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TopNavigationNodeDefinitionTests : ProvisionTestBase\r\n {\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add hierarchical top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TopNavigationNodeDefinitionTests : ProvisionTestBase\r\n{\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add hierarchical top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n TopNavigationNodeDefinitionTestsClass\r\n \r\n ClassTopNavigationNodeDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n \r\n \r\n \r\n Add top nav items\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var ourCompany = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar ourServices = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar ourTeam = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n CaDeployFlatTopNavigation\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests.CaDeployFlatTopNavigation\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n \r\n \r\n \r\n Add hierarchical top nav items\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // top level departments node\r\nvar departments = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar hr = new TopNavigationNodeDefinition\r\n{\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar it = new TopNavigationNodeDefinition\r\n{\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\n// top level clients node\r\nvar partners = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar microsoft = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar apple = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n CaDeployHierarchicalTopNavigation\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests.CaDeployHierarchicalTopNavigation\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n Navigation\r\n \r\n \r\n \r\n TopNavigationNodeDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TopNavigationNodeDefinitionTests : ProvisionTestBase\r\n {\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add hierarchical top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TopNavigationNodeDefinitionTests : ProvisionTestBase\r\n{\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add hierarchical top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n TopNavigationNodeDefinitionTestsClass\r\n \r\n ClassTopNavigationNodeDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CaDeployFlatTopNavigation = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n \r\n \r\n \r\n Add top nav items\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var ourCompany = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar ourServices = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar ourTeam = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n CaDeployFlatTopNavigation\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests.CaDeployFlatTopNavigation\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CaDeployHierarchicalTopNavigation = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n \r\n \r\n \r\n Add hierarchical top nav items\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // top level departments node\r\nvar departments = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar hr = new TopNavigationNodeDefinition\r\n{\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar it = new TopNavigationNodeDefinition\r\n{\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\n// top level clients node\r\nvar partners = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar microsoft = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar apple = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n CaDeployHierarchicalTopNavigation\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests.CaDeployHierarchicalTopNavigation\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample TopNavigationNodeDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n Navigation\r\n \r\n \r\n \r\n TopNavigationNodeDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TopNavigationNodeDefinitionTests : ProvisionTestBase\r\n {\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add hierarchical top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TopNavigationNodeDefinitionTests : ProvisionTestBase\r\n{\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add hierarchical top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n TopNavigationNodeDefinitionTestsClass\r\n \r\n ClassTopNavigationNodeDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CaDeployFlatTopNavigation = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n \r\n \r\n \r\n Add top nav items\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var ourCompany = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar ourServices = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar ourTeam = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n CaDeployFlatTopNavigation\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests.CaDeployFlatTopNavigation\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CaDeployHierarchicalTopNavigation = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n \r\n \r\n \r\n Add hierarchical top nav items\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // top level departments node\r\nvar departments = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar hr = new TopNavigationNodeDefinition\r\n{\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar it = new TopNavigationNodeDefinition\r\n{\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n};\r\n\r\n// top level clients node\r\nvar partners = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar microsoft = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar apple = new TopNavigationNodeDefinition\r\n{\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n CaDeployHierarchicalTopNavigation\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests.CaDeployHierarchicalTopNavigation\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample TopNavigationNodeDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Navigation\r\n Navigation\r\n \r\n \r\n \r\n TopNavigationNodeDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TopNavigationNodeDefinitionTests : ProvisionTestBase\r\n {\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add hierarchical top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TopNavigationNodeDefinitionTests : ProvisionTestBase\r\n{\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployFlatTopNavigation()\r\n {\r\n var ourCompany = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Company\",\r\n Url = \"our-company.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourServices = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Services\",\r\n Url = \"our-services.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var ourTeam = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Team\",\r\n Url = \"our-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(ourCompany)\r\n .AddTopNavigationNode(ourServices)\r\n .AddTopNavigationNode(ourTeam);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TopNavigationNodeDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add hierarchical top nav items\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CaDeployHierarchicalTopNavigation()\r\n {\r\n // top level departments node\r\n var departments = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Departments\",\r\n Url = \"our-departments.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var hr = new TopNavigationNodeDefinition\r\n {\r\n Title = \"HR Team\",\r\n Url = \"hr-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var it = new TopNavigationNodeDefinition\r\n {\r\n Title = \"IT Team\",\r\n Url = \"it-team.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n // top level clients node\r\n var partners = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Our Partners\",\r\n Url = \"our-partners.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var microsoft = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Microsoft\",\r\n Url = \"microsfot.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var apple = new TopNavigationNodeDefinition\r\n {\r\n Title = \"Apple\",\r\n Url = \"apple.aspx\",\r\n IsExternal = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddTopNavigationNode(departments, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(hr)\r\n .AddTopNavigationNode(it);\r\n })\r\n .AddTopNavigationNode(partners, node =>\r\n {\r\n node\r\n .AddTopNavigationNode(microsoft)\r\n .AddTopNavigationNode(apple);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TopNavigationNodeDefinitionTests\r\n TopNavigationNodeDefinitionTestsClass\r\n \r\n ClassTopNavigationNodeDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TopNavigationNodeDefinitionTests\r\n 0\r\n TopNavigationNodeDefinitionTests.cs\r\n TopNavigationNodeDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TopNavigationNodeDefinitionTests.cs\r\n"); } public static class TreeViewSettingsDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add tree view settings to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n{\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddTreeViewSettings(treeViewSettings);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TreeViewSettingsDefinitionTests\r\n CanDeploySimpleTreeViewSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests.CanDeploySimpleTreeViewSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests\r\n 0\r\n TreeViewSettingsDefinitionTests.cs\r\n TreeViewSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TreeViewSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n TreeViewSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TreeViewSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TreeViewSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add tree view settings to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TreeViewSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TreeViewSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add tree view settings to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TreeViewSettingsDefinitionTests\r\n TreeViewSettingsDefinitionTestsClass\r\n \r\n ClassTreeViewSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests\r\n 0\r\n TreeViewSettingsDefinitionTests.cs\r\n TreeViewSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TreeViewSettingsDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Add tree view settings to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n{\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddTreeViewSettings(treeViewSettings);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TreeViewSettingsDefinitionTests\r\n CanDeploySimpleTreeViewSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests.CanDeploySimpleTreeViewSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests\r\n 0\r\n TreeViewSettingsDefinitionTests.cs\r\n TreeViewSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TreeViewSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n TreeViewSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TreeViewSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TreeViewSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add tree view settings to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TreeViewSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TreeViewSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add tree view settings to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TreeViewSettingsDefinitionTests\r\n TreeViewSettingsDefinitionTestsClass\r\n \r\n ClassTreeViewSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests\r\n 0\r\n TreeViewSettingsDefinitionTests.cs\r\n TreeViewSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TreeViewSettingsDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTreeViewSettingsDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add tree view settings to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n{\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddTreeViewSettings(treeViewSettings);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TreeViewSettingsDefinitionTests\r\n CanDeploySimpleTreeViewSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests.CanDeploySimpleTreeViewSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests\r\n 0\r\n TreeViewSettingsDefinitionTests.cs\r\n TreeViewSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TreeViewSettingsDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample TreeViewSettingsDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n TreeViewSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TreeViewSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TreeViewSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add tree view settings to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TreeViewSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TreeViewSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add tree view settings to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TreeViewSettingsDefinitionTests\r\n TreeViewSettingsDefinitionTestsClass\r\n \r\n ClassTreeViewSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests\r\n 0\r\n TreeViewSettingsDefinitionTests.cs\r\n TreeViewSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TreeViewSettingsDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTreeViewSettingsDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Add tree view settings to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n{\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddTreeViewSettings(treeViewSettings);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TreeViewSettingsDefinitionTests\r\n CanDeploySimpleTreeViewSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests.CanDeploySimpleTreeViewSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests\r\n 0\r\n TreeViewSettingsDefinitionTests.cs\r\n TreeViewSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TreeViewSettingsDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample TreeViewSettingsDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n TreeViewSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TreeViewSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TreeViewSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add tree view settings to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TreeViewSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TreeViewSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add tree view settings to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTreeViewSettingsDefinition()\r\n {\r\n var treeViewSettings = new TreeViewSettingsDefinition\r\n {\r\n TreeViewEnabled = true,\r\n QuickLaunchEnabled = true\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddTreeViewSettings(treeViewSettings);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TreeViewSettingsDefinitionTests\r\n TreeViewSettingsDefinitionTestsClass\r\n \r\n ClassTreeViewSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TreeViewSettingsDefinitionTests\r\n 0\r\n TreeViewSettingsDefinitionTests.cs\r\n TreeViewSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\TreeViewSettingsDefinitionTests.cs\r\n"); } public static class UniqueContentTypeFieldsOrderDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Reorder content type fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var debitField = new NumberFieldDefinition\r\n{\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n};\r\n\r\nvar creditField = new NumberFieldDefinition\r\n{\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n};\r\n\r\nvar totalField = new NumberFieldDefinition\r\n{\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n};\r\n\r\nvar balanceContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n CanReorderContentTypeFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests.CanReorderContentTypeFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests\r\n 0\r\n UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UniqueContentTypeFieldsOrderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeFieldsOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UniqueContentTypeFieldsOrderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeFieldsOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n UniqueContentTypeFieldsOrderDefinitionTestsClass\r\n \r\n ClassUniqueContentTypeFieldsOrderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests\r\n 0\r\n UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Reorder content type fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var debitField = new NumberFieldDefinition\r\n{\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n};\r\n\r\nvar creditField = new NumberFieldDefinition\r\n{\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n};\r\n\r\nvar totalField = new NumberFieldDefinition\r\n{\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n};\r\n\r\nvar balanceContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n CanReorderContentTypeFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests.CanReorderContentTypeFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests\r\n 0\r\n UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UniqueContentTypeFieldsOrderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeFieldsOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UniqueContentTypeFieldsOrderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeFieldsOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n UniqueContentTypeFieldsOrderDefinitionTestsClass\r\n \r\n ClassUniqueContentTypeFieldsOrderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests\r\n 0\r\n UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanReorderContentTypeFields = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Reorder content type fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var debitField = new NumberFieldDefinition\r\n{\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n};\r\n\r\nvar creditField = new NumberFieldDefinition\r\n{\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n};\r\n\r\nvar totalField = new NumberFieldDefinition\r\n{\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n};\r\n\r\nvar balanceContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n CanReorderContentTypeFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests.CanReorderContentTypeFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests\r\n 0\r\n UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample UniqueContentTypeFieldsOrderDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UniqueContentTypeFieldsOrderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeFieldsOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UniqueContentTypeFieldsOrderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeFieldsOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n UniqueContentTypeFieldsOrderDefinitionTestsClass\r\n \r\n ClassUniqueContentTypeFieldsOrderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests\r\n 0\r\n UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanReorderContentTypeFields = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Reorder content type fields\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var debitField = new NumberFieldDefinition\r\n{\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n};\r\n\r\nvar creditField = new NumberFieldDefinition\r\n{\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n};\r\n\r\nvar totalField = new NumberFieldDefinition\r\n{\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n};\r\n\r\nvar balanceContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n CanReorderContentTypeFields\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests.CanReorderContentTypeFields\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests\r\n 0\r\n UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample UniqueContentTypeFieldsOrderDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Content types\r\n Content types\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UniqueContentTypeFieldsOrderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeFieldsOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UniqueContentTypeFieldsOrderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeFieldsOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content type fields\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypeFields()\r\n {\r\n var debitField = new NumberFieldDefinition\r\n {\r\n Title = \"Debit\",\r\n InternalName = \"m2_MDebit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2901EA31-CB32-4EE7-8482-9354C843F264\"),\r\n };\r\n\r\n var creditField = new NumberFieldDefinition\r\n {\r\n Title = \"Credit\",\r\n InternalName = \"m2_MCredit\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"2F62D945-AFF8-4ACF-B090-4BB5A8FB13C9\"),\r\n };\r\n\r\n var totalField = new NumberFieldDefinition\r\n {\r\n Title = \"Total\",\r\n InternalName = \"m2_MTotal\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"07D7B101-3F95-4413-B5D0-0EAA75E31697\"),\r\n };\r\n\r\n var balanceContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Balance\",\r\n Id = new Guid(\"1861F08E-4E76-4DA3-9CE9-842B481FD0DA\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddField(debitField)\r\n .AddField(creditField)\r\n .AddField(totalField)\r\n .AddContentType(balanceContentType, contentType =>\r\n {\r\n contentType\r\n .AddContentTypeFieldLink(totalField)\r\n .AddContentTypeFieldLink(debitField)\r\n .AddContentTypeFieldLink(creditField)\r\n .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition\r\n {\r\n Fields = new List<FieldLinkValue>\r\n {\r\n new FieldLinkValue{ Id = BuiltInFieldId.Title },\r\n new FieldLinkValue{ Id = creditField.Id },\r\n new FieldLinkValue{ Id = debitField.Id },\r\n new FieldLinkValue{ Id = totalField.Id }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n UniqueContentTypeFieldsOrderDefinitionTestsClass\r\n \r\n ClassUniqueContentTypeFieldsOrderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeFieldsOrderDefinitionTests\r\n 0\r\n UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n UniqueContentTypeFieldsOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeFieldsOrderDefinitionTests.cs\r\n"); } public static class UniqueContentTypeOrderDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Reorder content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var creditContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar debitContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar totalContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar annualRevenueList = new ListDefinition\r\n{\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeOrderDefinitionTests\r\n CanReorderContentTypesInList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests.CanReorderContentTypesInList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests\r\n 0\r\n UniqueContentTypeOrderDefinitionTests.cs\r\n UniqueContentTypeOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeOrderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n UniqueContentTypeOrderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UniqueContentTypeOrderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UniqueContentTypeOrderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeOrderDefinitionTests\r\n UniqueContentTypeOrderDefinitionTestsClass\r\n \r\n ClassUniqueContentTypeOrderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests\r\n 0\r\n UniqueContentTypeOrderDefinitionTests.cs\r\n UniqueContentTypeOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeOrderDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Reorder content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var creditContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar debitContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar totalContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar annualRevenueList = new ListDefinition\r\n{\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeOrderDefinitionTests\r\n CanReorderContentTypesInList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests.CanReorderContentTypesInList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests\r\n 0\r\n UniqueContentTypeOrderDefinitionTests.cs\r\n UniqueContentTypeOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeOrderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n UniqueContentTypeOrderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UniqueContentTypeOrderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UniqueContentTypeOrderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeOrderDefinitionTests\r\n UniqueContentTypeOrderDefinitionTestsClass\r\n \r\n ClassUniqueContentTypeOrderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests\r\n 0\r\n UniqueContentTypeOrderDefinitionTests.cs\r\n UniqueContentTypeOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeOrderDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanReorderContentTypesInList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Reorder content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var creditContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar debitContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar totalContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar annualRevenueList = new ListDefinition\r\n{\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeOrderDefinitionTests\r\n CanReorderContentTypesInList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests.CanReorderContentTypesInList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests\r\n 0\r\n UniqueContentTypeOrderDefinitionTests.cs\r\n UniqueContentTypeOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeOrderDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample UniqueContentTypeOrderDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n UniqueContentTypeOrderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UniqueContentTypeOrderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UniqueContentTypeOrderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeOrderDefinitionTests\r\n UniqueContentTypeOrderDefinitionTestsClass\r\n \r\n ClassUniqueContentTypeOrderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests\r\n 0\r\n UniqueContentTypeOrderDefinitionTests.cs\r\n UniqueContentTypeOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeOrderDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanReorderContentTypesInList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n \r\n \r\n \r\n Reorder content types\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var creditContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar debitContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar totalContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n};\r\n\r\nvar annualRevenueList = new ListDefinition\r\n{\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeOrderDefinitionTests\r\n CanReorderContentTypesInList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests.CanReorderContentTypesInList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests\r\n 0\r\n UniqueContentTypeOrderDefinitionTests.cs\r\n UniqueContentTypeOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeOrderDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample UniqueContentTypeOrderDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Lists and libraries\r\n Lists and libraries\r\n \r\n \r\n \r\n UniqueContentTypeOrderDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UniqueContentTypeOrderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UniqueContentTypeOrderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UniqueContentTypeOrderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Reorder content types\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanReorderContentTypesInList()\r\n {\r\n var creditContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Credit\",\r\n Id = new Guid(\"5D8346E4-A7AB-40AE-9AE9-22CF18170029\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var debitContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Debit\",\r\n Id = new Guid(\"0C8D0474-384B-4765-8F84-993124447516\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var totalContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Total\",\r\n Id = new Guid(\"110E6911-4611-4905-9E2F-46FEA608B418\"),\r\n ParentContentTypeId = BuiltInContentTypeId.Item,\r\n Group = \"SPMeta2.Samples\"\r\n };\r\n\r\n var annualRevenueList = new ListDefinition\r\n {\r\n Title = \"M2 Annual Revenue\",\r\n Description = \"A generic list.\",\r\n TemplateType = BuiltInListTemplateTypeId.GenericList,\r\n ContentTypesEnabled = true,\r\n Url = \"M2AnnualRevenue\"\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddContentType(creditContentType)\r\n .AddContentType(debitContentType)\r\n .AddContentType(totalContentType);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddList(annualRevenueList, list =>\r\n {\r\n list\r\n .AddContentTypeLink(totalContentType)\r\n .AddContentTypeLink(creditContentType)\r\n .AddContentTypeLink(debitContentType)\r\n .AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition\r\n {\r\n ContentTypes = new List<ContentTypeLinkValue>\r\n {\r\n new ContentTypeLinkValue{ ContentTypeName = creditContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = debitContentType.Name },\r\n new ContentTypeLinkValue{ ContentTypeName = totalContentType.Name }\r\n }\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UniqueContentTypeOrderDefinitionTests\r\n UniqueContentTypeOrderDefinitionTestsClass\r\n \r\n ClassUniqueContentTypeOrderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UniqueContentTypeOrderDefinitionTests\r\n 0\r\n UniqueContentTypeOrderDefinitionTests.cs\r\n UniqueContentTypeOrderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UniqueContentTypeOrderDefinitionTests.cs\r\n"); } public static class URLFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add URL field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n URLFieldDefinitionTests\r\n CanDeploySimpleURLFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests.CanDeploySimpleURLFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests\r\n 0\r\n URLFieldDefinitionTests.cs\r\n URLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\URLFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n URLFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class URLFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.URLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add URL field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class URLFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.URLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add URL field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n URLFieldDefinitionTests\r\n URLFieldDefinitionTestsClass\r\n \r\n ClassURLFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests\r\n 0\r\n URLFieldDefinitionTests.cs\r\n URLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\URLFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add URL field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n URLFieldDefinitionTests\r\n CanDeploySimpleURLFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests.CanDeploySimpleURLFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests\r\n 0\r\n URLFieldDefinitionTests.cs\r\n URLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\URLFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n URLFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class URLFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.URLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add URL field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class URLFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.URLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add URL field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n URLFieldDefinitionTests\r\n URLFieldDefinitionTestsClass\r\n \r\n ClassURLFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests\r\n 0\r\n URLFieldDefinitionTests.cs\r\n URLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\URLFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleURLFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add URL field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n URLFieldDefinitionTests\r\n CanDeploySimpleURLFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests.CanDeploySimpleURLFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests\r\n 0\r\n URLFieldDefinitionTests.cs\r\n URLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\URLFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample URLFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n URLFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class URLFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.URLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add URL field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class URLFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.URLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add URL field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n URLFieldDefinitionTests\r\n URLFieldDefinitionTestsClass\r\n \r\n ClassURLFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests\r\n 0\r\n URLFieldDefinitionTests.cs\r\n URLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\URLFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleURLFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add URL field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n URLFieldDefinitionTests\r\n CanDeploySimpleURLFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests.CanDeploySimpleURLFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests\r\n 0\r\n URLFieldDefinitionTests.cs\r\n URLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\URLFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample URLFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n URLFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class URLFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.URLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add URL field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class URLFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.URLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add URL field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleURLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n URLFieldDefinitionTests\r\n URLFieldDefinitionTestsClass\r\n \r\n ClassURLFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.URLFieldDefinitionTests\r\n 0\r\n URLFieldDefinitionTests.cs\r\n URLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\URLFieldDefinitionTests.cs\r\n"); } public static class UserCustomActionDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Add custom action to site\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddUserCustomAction(siteLogger);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionUnderSite\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionUnderSite\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Add custom action with jQuery\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var jQueryFile = new ModuleFileDefinition\r\n{\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n};\r\n\r\nvar appScriptsFolder = new FolderDefinition\r\n{\r\n Name = \"M2 App Scripts\"\r\n};\r\n\r\nvar jQueryCustomAction = new UserCustomActionDefinition\r\n{\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n};\r\n\r\nvar jQuerySiteLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionWithJquery\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionWithJquery\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Add custom action to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var webLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n};\r\n\r\nvar loggerWeb = new WebDefinition\r\n{\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionOnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionOnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Add custom action to list\r\n \r\n \r\n \r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n // TODO\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionOnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionOnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n User custom action\r\n \r\n \r\n \r\n UserCustomActionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UserCustomActionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action with jQuery\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add custom action to list\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UserCustomActionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action with jQuery\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add custom action to list\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n UserCustomActionDefinitionTestsClass\r\n \r\n ClassUserCustomActionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add custom action to site\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddUserCustomAction(siteLogger);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionUnderSite\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionUnderSite\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add custom action with jQuery\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var jQueryFile = new ModuleFileDefinition\r\n{\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n};\r\n\r\nvar appScriptsFolder = new FolderDefinition\r\n{\r\n Name = \"M2 App Scripts\"\r\n};\r\n\r\nvar jQueryCustomAction = new UserCustomActionDefinition\r\n{\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n};\r\n\r\nvar jQuerySiteLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionWithJquery\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionWithJquery\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add custom action to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var webLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n};\r\n\r\nvar loggerWeb = new WebDefinition\r\n{\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionOnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionOnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add custom action to list\r\n \r\n \r\n \r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n // TODO\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionOnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionOnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n User custom action\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n UserCustomActionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UserCustomActionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action with jQuery\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add custom action to list\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UserCustomActionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action with jQuery\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add custom action to list\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n UserCustomActionDefinitionTestsClass\r\n \r\n ClassUserCustomActionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployUserCustomActionUnderSite = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Add custom action to site\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddUserCustomAction(siteLogger);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionUnderSite\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionUnderSite\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployUserCustomActionWithJquery = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Add custom action with jQuery\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var jQueryFile = new ModuleFileDefinition\r\n{\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n};\r\n\r\nvar appScriptsFolder = new FolderDefinition\r\n{\r\n Name = \"M2 App Scripts\"\r\n};\r\n\r\nvar jQueryCustomAction = new UserCustomActionDefinition\r\n{\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n};\r\n\r\nvar jQuerySiteLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionWithJquery\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionWithJquery\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployUserCustomActionOnWeb = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Add custom action to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var webLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n};\r\n\r\nvar loggerWeb = new WebDefinition\r\n{\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionOnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionOnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployUserCustomActionOnList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Add custom action to list\r\n \r\n \r\n \r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n // TODO\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionOnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionOnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample UserCustomActionDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n User custom action\r\n \r\n \r\n \r\n UserCustomActionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UserCustomActionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action with jQuery\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add custom action to list\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UserCustomActionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action with jQuery\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add custom action to list\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n UserCustomActionDefinitionTestsClass\r\n \r\n ClassUserCustomActionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployUserCustomActionUnderSite = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add custom action to site\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddUserCustomAction(siteLogger);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionUnderSite\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionUnderSite\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployUserCustomActionWithJquery = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add custom action with jQuery\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var jQueryFile = new ModuleFileDefinition\r\n{\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n};\r\n\r\nvar appScriptsFolder = new FolderDefinition\r\n{\r\n Name = \"M2 App Scripts\"\r\n};\r\n\r\nvar jQueryCustomAction = new UserCustomActionDefinition\r\n{\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n};\r\n\r\nvar jQuerySiteLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionWithJquery\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionWithJquery\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployUserCustomActionOnWeb = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add custom action to web\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var webLogger = new UserCustomActionDefinition\r\n{\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n};\r\n\r\nvar loggerWeb = new WebDefinition\r\n{\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionOnWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionOnWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployUserCustomActionOnList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add custom action to list\r\n \r\n \r\n \r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n // TODO\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n CanDeployUserCustomActionOnList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests.CanDeployUserCustomActionOnList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample UserCustomActionDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n User custom action\r\n User custom action\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n UserCustomActionDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class UserCustomActionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action with jQuery\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add custom action to list\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class UserCustomActionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to site\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionUnderSite()\r\n {\r\n var siteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2SiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl);\",\r\n Sequence = 1000\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddUserCustomAction(siteLogger);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action with jQuery\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionWithJquery()\r\n {\r\n var jQueryFile = new ModuleFileDefinition\r\n {\r\n FileName = \"jquery-1.11.2.min.js\",\r\n Content = ModuleFileUtils.FromResource(GetType().Assembly, \"SPMeta2.Docs.Modules.jquery-1.11.2.min.js\"),\r\n Overwrite = true\r\n };\r\n\r\n var appScriptsFolder = new FolderDefinition\r\n {\r\n Name = \"M2 App Scripts\"\r\n };\r\n\r\n var jQueryCustomAction = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuery\",\r\n Location = \"ScriptLink\",\r\n ScriptSrc = UrlUtility.CombineUrl(new string[]\r\n {\r\n \"~sitecollection\",\r\n BuiltInListDefinitions.StyleLibrary.GetListUrl(),\r\n appScriptsFolder.Name,\r\n jQueryFile.FileName\r\n }),\r\n Sequence = 1500\r\n };\r\n\r\n var jQuerySiteLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2jQuerySiteLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"jQuery(document).ready( function() { console.log(\'jQuery site logger on site:\' + _spPageContextInfo.siteAbsoluteUrl); } );\",\r\n Sequence = 1600\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddUserCustomAction(jQueryCustomAction)\r\n .AddUserCustomAction(jQuerySiteLogger);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.StyleLibrary, list =>\r\n {\r\n list.AddFolder(appScriptsFolder, folder =>\r\n {\r\n folder.AddModuleFile(jQueryFile);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.UserCustomActionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom action to web\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnWeb()\r\n {\r\n var webLogger = new UserCustomActionDefinition\r\n {\r\n Name = \"m2WebLogger\",\r\n Location = \"ScriptLink\",\r\n ScriptBlock = \"console.log(\'site logger on web:\' + _spPageContextInfo.webAbsoluteUrl);\",\r\n Sequence = 1800\r\n };\r\n\r\n var loggerWeb = new WebDefinition\r\n {\r\n Title = \"M2 Logger Web\",\r\n Url = \"m2logging\",\r\n WebTemplate = BuiltInWebTemplates.Collaboration.TeamSite\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWeb(loggerWeb, subWeb =>\r\n {\r\n subWeb.AddUserCustomAction(webLogger);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [SampleMetadata(Title = \"Add custom action to list\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployUserCustomActionOnList()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n // TODO\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n UserCustomActionDefinitionTests\r\n UserCustomActionDefinitionTestsClass\r\n \r\n ClassUserCustomActionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.UserCustomActionDefinitionTests\r\n 0\r\n UserCustomActionDefinitionTests.cs\r\n UserCustomActionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\UserCustomActionDefinitionTests.cs\r\n"); } public static class UserFieldDefinitionTests @@ -1363,21 +1399,21 @@ public static class UserFieldDefinitionTests public static class WebApplicationDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add web application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebApplicationDefinitionTests\r\n CanDeploySimpleWebApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests.CanDeploySimpleWebApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests\r\n 0\r\n WebApplicationDefinitionTests.cs\r\n WebApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebApplicationDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n WebApplicationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebApplicationDefinitionTests\r\n WebApplicationDefinitionTestsClass\r\n \r\n ClassWebApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests\r\n 0\r\n WebApplicationDefinitionTests.cs\r\n WebApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebApplicationDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add web application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebApplicationDefinitionTests\r\n CanDeploySimpleWebApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests.CanDeploySimpleWebApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests\r\n 0\r\n WebApplicationDefinitionTests.cs\r\n WebApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebApplicationDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n WebApplicationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebApplicationDefinitionTests\r\n WebApplicationDefinitionTestsClass\r\n \r\n ClassWebApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests\r\n 0\r\n WebApplicationDefinitionTests.cs\r\n WebApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebApplicationDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleWebApplicationDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add web application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebApplicationDefinitionTests\r\n CanDeploySimpleWebApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests.CanDeploySimpleWebApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests\r\n 0\r\n WebApplicationDefinitionTests.cs\r\n WebApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebApplicationDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample WebApplicationDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n WebApplicationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebApplicationDefinitionTests\r\n WebApplicationDefinitionTestsClass\r\n \r\n ClassWebApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests\r\n 0\r\n WebApplicationDefinitionTests.cs\r\n WebApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebApplicationDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleWebApplicationDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add web application\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebApplicationDefinitionTests\r\n CanDeploySimpleWebApplicationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests.CanDeploySimpleWebApplicationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests\r\n 0\r\n WebApplicationDefinitionTests.cs\r\n WebApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebApplicationDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample WebApplicationDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n WebApplicationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebApplicationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebApplicationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebApplicationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web application\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWebApplicationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebApplicationDefinitionTests\r\n WebApplicationDefinitionTestsClass\r\n \r\n ClassWebApplicationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebApplicationDefinitionTests\r\n 0\r\n WebApplicationDefinitionTests.cs\r\n WebApplicationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebApplicationDefinitionTests.cs\r\n"); } public static class WebConfigModificationDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Add web.config modification\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebConfigModificationDefinitionTests\r\n CanDeploySimpleWebConfigModificationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests.CanDeploySimpleWebConfigModificationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests\r\n 0\r\n WebConfigModificationDefinitionTests.cs\r\n WebConfigModificationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebConfigModificationDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n WebConfigModificationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n public class WebConfigModificationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebConfigModificationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web.config modification\",\r\n Description = \"\"\r\n )]\r\n \r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n public class WebConfigModificationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebConfigModificationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web.config modification\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebConfigModificationDefinitionTests\r\n WebConfigModificationDefinitionTestsClass\r\n \r\n ClassWebConfigModificationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests\r\n 0\r\n WebConfigModificationDefinitionTests.cs\r\n WebConfigModificationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebConfigModificationDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n Add web.config modification\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebConfigModificationDefinitionTests\r\n CanDeploySimpleWebConfigModificationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests.CanDeploySimpleWebConfigModificationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests\r\n 0\r\n WebConfigModificationDefinitionTests.cs\r\n WebConfigModificationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebConfigModificationDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n WebConfigModificationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n public class WebConfigModificationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebConfigModificationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web.config modification\",\r\n Description = \"\"\r\n )]\r\n \r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n public class WebConfigModificationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebConfigModificationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web.config modification\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebConfigModificationDefinitionTests\r\n WebConfigModificationDefinitionTestsClass\r\n \r\n ClassWebConfigModificationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests\r\n 0\r\n WebConfigModificationDefinitionTests.cs\r\n WebConfigModificationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebConfigModificationDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleWebConfigModificationDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Add web.config modification\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebConfigModificationDefinitionTests\r\n CanDeploySimpleWebConfigModificationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests.CanDeploySimpleWebConfigModificationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests\r\n 0\r\n WebConfigModificationDefinitionTests.cs\r\n WebConfigModificationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebConfigModificationDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample WebConfigModificationDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n WebConfigModificationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n public class WebConfigModificationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebConfigModificationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web.config modification\",\r\n Description = \"\"\r\n )]\r\n \r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n public class WebConfigModificationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebConfigModificationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web.config modification\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebConfigModificationDefinitionTests\r\n WebConfigModificationDefinitionTestsClass\r\n \r\n ClassWebConfigModificationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests\r\n 0\r\n WebConfigModificationDefinitionTests.cs\r\n WebConfigModificationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebConfigModificationDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleWebConfigModificationDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n \r\n \r\n \r\n Add web.config modification\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebConfigModificationDefinitionTests\r\n CanDeploySimpleWebConfigModificationDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests.CanDeploySimpleWebConfigModificationDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests\r\n 0\r\n WebConfigModificationDefinitionTests.cs\r\n WebConfigModificationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebConfigModificationDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample WebConfigModificationDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web application\r\n Web application\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Application Model\r\n Web Application Model\r\n \r\n \r\n \r\n WebConfigModificationDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n public class WebConfigModificationDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebConfigModificationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web.config modification\",\r\n Description = \"\"\r\n )]\r\n \r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n public class WebConfigModificationDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebConfigModificationDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web.config modification\",\r\n Description = \"\"\r\n )]\r\n\r\n public void CanDeploySimpleWebConfigModificationDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebConfigModificationDefinitionTests\r\n WebConfigModificationDefinitionTestsClass\r\n \r\n ClassWebConfigModificationDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebConfigModificationDefinitionTests\r\n 0\r\n WebConfigModificationDefinitionTests.cs\r\n WebConfigModificationDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebConfigModificationDefinitionTests.cs\r\n"); } public static class WebDefinitionTest @@ -1397,101 +1433,101 @@ public static class WebDefinitionTest public static class WebPartDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part by type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n // this would deploy a web part using WebpartType prop\r\n// you need to provide AssemblyQualifiedName of the target web part type\r\n// M2 would use reflection to create an instane of the web part in the runtime\r\n// that works only for SSOM, not CSOM support yet\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeploySSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByWebpartType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByWebpartType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part by XML\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n// you need to provide an XML template which you get from SharePoint\r\n// export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n// here is a web part XML template\r\n// usually, you export that XML from SharePoint page, but M2 has pre-build class\r\nvar contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByXML\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByXML\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part from Gallery File\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // this would deploy the web part using WebpartFileName\r\n// you need to provide a file name ofthe web part template in the web part gallery\r\n// M2 would load this file, then use an XML as a web part template\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByWebpartGalleryFileName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByWebpartGalleryFileName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part with pre-configured XML\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n// here is a web part XML template\r\n// usually, you export that XML from SharePoint page, but M2 has pre-build class\r\nvar contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n// let\' set new some properties, shall we?\r\n// we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n// it works well web both V2/V3 web part XML\r\n// then change properties and seehow it goes\r\n// then call ToString() to get string out of XML\r\nvar wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployCSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartWithPreprocessedXML\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartWithPreprocessedXML\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n WebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part by type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part by XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part from Gallery File\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part with pre-configured XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part by type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part by XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part from Gallery File\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part with pre-configured XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n WebPartDefinitionTestsClass\r\n \r\n ClassWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part by type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n // this would deploy a web part using WebpartType prop\r\n// you need to provide AssemblyQualifiedName of the target web part type\r\n// M2 would use reflection to create an instane of the web part in the runtime\r\n// that works only for SSOM, not CSOM support yet\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeploySSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByWebpartType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByWebpartType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part by XML\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n// you need to provide an XML template which you get from SharePoint\r\n// export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n// here is a web part XML template\r\n// usually, you export that XML from SharePoint page, but M2 has pre-build class\r\nvar contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByXML\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByXML\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part from Gallery File\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // this would deploy the web part using WebpartFileName\r\n// you need to provide a file name ofthe web part template in the web part gallery\r\n// M2 would load this file, then use an XML as a web part template\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByWebpartGalleryFileName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByWebpartGalleryFileName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part with pre-configured XML\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n// here is a web part XML template\r\n// usually, you export that XML from SharePoint page, but M2 has pre-build class\r\nvar contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n// let\' set new some properties, shall we?\r\n// we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n// it works well web both V2/V3 web part XML\r\n// then change properties and seehow it goes\r\n// then call ToString() to get string out of XML\r\nvar wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployCSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartWithPreprocessedXML\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartWithPreprocessedXML\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n WebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part by type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part by XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part from Gallery File\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part with pre-configured XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part by type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part by XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part from Gallery File\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part with pre-configured XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n WebPartDefinitionTestsClass\r\n \r\n ClassWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebpartByWebpartType = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part by type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n // this would deploy a web part using WebpartType prop\r\n// you need to provide AssemblyQualifiedName of the target web part type\r\n// M2 would use reflection to create an instane of the web part in the runtime\r\n// that works only for SSOM, not CSOM support yet\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeploySSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByWebpartType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByWebpartType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebpartByXML = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part by XML\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n// you need to provide an XML template which you get from SharePoint\r\n// export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n// here is a web part XML template\r\n// usually, you export that XML from SharePoint page, but M2 has pre-build class\r\nvar contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByXML\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByXML\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebpartByWebpartGalleryFileName = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part from Gallery File\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // this would deploy the web part using WebpartFileName\r\n// you need to provide a file name ofthe web part template in the web part gallery\r\n// M2 would load this file, then use an XML as a web part template\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByWebpartGalleryFileName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByWebpartGalleryFileName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebpartWithPreprocessedXML = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part with pre-configured XML\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n// here is a web part XML template\r\n// usually, you export that XML from SharePoint page, but M2 has pre-build class\r\nvar contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n// let\' set new some properties, shall we?\r\n// we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n// it works well web both V2/V3 web part XML\r\n// then change properties and seehow it goes\r\n// then call ToString() to get string out of XML\r\nvar wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployCSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartWithPreprocessedXML\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartWithPreprocessedXML\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample WebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n WebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part by type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part by XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part from Gallery File\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part with pre-configured XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part by type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part by XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part from Gallery File\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part with pre-configured XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n WebPartDefinitionTestsClass\r\n \r\n ClassWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebpartByWebpartType = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part by type\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n // this would deploy a web part using WebpartType prop\r\n// you need to provide AssemblyQualifiedName of the target web part type\r\n// M2 would use reflection to create an instane of the web part in the runtime\r\n// that works only for SSOM, not CSOM support yet\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeploySSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByWebpartType\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByWebpartType\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebpartByXML = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part by XML\r\n \r\n \r\n \r\n\r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n// you need to provide an XML template which you get from SharePoint\r\n// export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n// here is a web part XML template\r\n// usually, you export that XML from SharePoint page, but M2 has pre-build class\r\nvar contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByXML\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByXML\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebpartByWebpartGalleryFileName = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part from Gallery File\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // this would deploy the web part using WebpartFileName\r\n// you need to provide a file name ofthe web part template in the web part gallery\r\n// M2 would load this file, then use an XML as a web part template\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartByWebpartGalleryFileName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartByWebpartGalleryFileName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebpartWithPreprocessedXML = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add web part with pre-configured XML\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n// here is a web part XML template\r\n// usually, you export that XML from SharePoint page, but M2 has pre-build class\r\nvar contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n// let\' set new some properties, shall we?\r\n// we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n// it works well web both V2/V3 web part XML\r\n// then change properties and seehow it goes\r\n// then call ToString() to get string out of XML\r\nvar wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\nvar contentEditorWebPart = new WebPartDefinition\r\n{\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n});\r\n\r\nDeployCSOMModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n CanDeployWebpartWithPreprocessedXML\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests.CanDeployWebpartWithPreprocessedXML\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample WebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n WebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part by type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part by XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part from Gallery File\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part with pre-configured XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part by type\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartByWebpartType()\r\n {\r\n // this would deploy a web part using WebpartType prop\r\n // you need to provide AssemblyQualifiedName of the target web part type\r\n // M2 would use reflection to create an instane of the web part in the runtime\r\n // that works only for SSOM, not CSOM support yet\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint SSOM\",\r\n Id = \"m2AboutSharePointSSOM\",\r\n WebpartType = typeof(ContentEditorWebPart).AssemblyQualifiedName,\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeploySSOMModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part by XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByXML()\r\n {\r\n // this whould deploy the web part using WebpartXmlTemplate prop\r\n // you need to provide an XML template which you get from SharePoint\r\n // export the wenb part, and put it into WebpartXmlTemplate prop\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint XML\",\r\n Id = \"m2AboutSharePointXML\",\r\n WebpartXmlTemplate = contentEditorWebPartXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part from Gallery File\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebpartByWebpartGalleryFileName()\r\n {\r\n // this would deploy the web part using WebpartFileName\r\n // you need to provide a file name ofthe web part template in the web part gallery\r\n // M2 would load this file, then use an XML as a web part template\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"About SharePoint web part gallery\",\r\n Id = \"m2AboutSharePointWebPartGallery\",\r\n // shortcut to \"MSContentEditor.dwp\",\r\n WebpartFileName = BuiltInWebpartFileNames.MSContentEditor,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part with pre-configured XML\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployWebpartWithPreprocessedXML()\r\n {\r\n // this shows how to use M2 API to pre-process web part XML\r\n\r\n // here is a web part XML template\r\n // usually, you export that XML from SharePoint page, but M2 has pre-build class\r\n var contentEditorWebPartXml = BuiltInWebPartTemplates.ContentEditorWebPart;\r\n\r\n // let\' set new some properties, shall we?\r\n // we load XML by WebpartXmlExtensions.LoadWebpartXmlDocument() method\r\n // it works well web both V2/V3 web part XML\r\n // then change properties and seehow it goes\r\n // then call ToString() to get string out of XML\r\n var wpXml = WebpartXmlExtensions\r\n .LoadWebpartXmlDocument(contentEditorWebPartXml)\r\n .SetOrUpdateProperty(\"FrameType\", \"Standard\")\r\n .SetOrUpdateProperty(\"Width\", \"500\")\r\n .SetOrUpdateProperty(\"Heigth\", \"200\")\r\n .SetOrUpdateContentEditorWebPartProperty(\"Content\", \"This is a new content!\", true)\r\n .ToString();\r\n\r\n var contentEditorWebPart = new WebPartDefinition\r\n {\r\n Title = \"New content\",\r\n Id = \"m2AboutSharePointnewContent\",\r\n WebpartXmlTemplate = wpXml,\r\n ZoneIndex = 20,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 webparts provision\",\r\n FileName = \"web-parts-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddWebPart(contentEditorWebPart);\r\n });\r\n });\r\n });\r\n\r\n DeployCSOMModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartDefinitionTests\r\n WebPartDefinitionTestsClass\r\n \r\n ClassWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartDefinitionTests\r\n 0\r\n WebPartDefinitionTests.cs\r\n WebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartDefinitionTests.cs\r\n"); } public static class WebPartPageDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add web part page\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n \r\n \r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customersReportPage = new WebPartPageDefinition\r\n{\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar parthesReportPage = new WebPartPageDefinition\r\n{\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPages\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPages\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add custom web part page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPageWithCustomTemplate\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPageWithCustomTemplate\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add web part page to folder\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // clients folder and pages\r\nvar clientsFolder = new FolderDefinition()\r\n{\r\n Name = \"Customers\"\r\n};\r\n\r\nvar clientMay2015Page = new WebPartPageDefinition\r\n{\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar clientJune2015Page = new WebPartPageDefinition\r\n{\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\n// parthers folder and pages\r\nvar parthersFolder = new FolderDefinition()\r\n{\r\n Name = \"Parthers\"\r\n};\r\n\r\nvar parther2014AnnualReport = new WebPartPageDefinition\r\n{\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar parther2015AnnualReport = new WebPartPageDefinition\r\n{\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n};\r\n\r\n// linking everything together\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPagesUnderFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPagesUnderFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n Web part pages\r\n \r\n \r\n \r\n WebPartPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebPartPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part page to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebPartPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part page to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n WebPartPageDefinitionTestsClass\r\n \r\n ClassWebPartPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add web part page\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n \r\n \r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customersReportPage = new WebPartPageDefinition\r\n{\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar parthesReportPage = new WebPartPageDefinition\r\n{\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPages\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPages\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add custom web part page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPageWithCustomTemplate\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPageWithCustomTemplate\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add web part page to folder\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // clients folder and pages\r\nvar clientsFolder = new FolderDefinition()\r\n{\r\n Name = \"Customers\"\r\n};\r\n\r\nvar clientMay2015Page = new WebPartPageDefinition\r\n{\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar clientJune2015Page = new WebPartPageDefinition\r\n{\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\n// parthers folder and pages\r\nvar parthersFolder = new FolderDefinition()\r\n{\r\n Name = \"Parthers\"\r\n};\r\n\r\nvar parther2014AnnualReport = new WebPartPageDefinition\r\n{\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar parther2015AnnualReport = new WebPartPageDefinition\r\n{\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n};\r\n\r\n// linking everything together\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPagesUnderFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPagesUnderFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n Web part pages\r\n \r\n \r\n \r\n WebPartPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebPartPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part page to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebPartPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part page to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n WebPartPageDefinitionTestsClass\r\n \r\n ClassWebPartPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebPartPages = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add web part page\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n \r\n \r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customersReportPage = new WebPartPageDefinition\r\n{\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar parthesReportPage = new WebPartPageDefinition\r\n{\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPages\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPages\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebPartPageWithCustomTemplate = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add custom web part page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPageWithCustomTemplate\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPageWithCustomTemplate\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebPartPagesUnderFolders = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add web part page to folder\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // clients folder and pages\r\nvar clientsFolder = new FolderDefinition()\r\n{\r\n Name = \"Customers\"\r\n};\r\n\r\nvar clientMay2015Page = new WebPartPageDefinition\r\n{\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar clientJune2015Page = new WebPartPageDefinition\r\n{\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\n// parthers folder and pages\r\nvar parthersFolder = new FolderDefinition()\r\n{\r\n Name = \"Parthers\"\r\n};\r\n\r\nvar parther2014AnnualReport = new WebPartPageDefinition\r\n{\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar parther2015AnnualReport = new WebPartPageDefinition\r\n{\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n};\r\n\r\n// linking everything together\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPagesUnderFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPagesUnderFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample WebPartPageDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n Web part pages\r\n \r\n \r\n \r\n WebPartPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebPartPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part page to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebPartPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part page to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n WebPartPageDefinitionTestsClass\r\n \r\n ClassWebPartPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebPartPages = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add web part page\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n \r\n \r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customersReportPage = new WebPartPageDefinition\r\n{\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar parthesReportPage = new WebPartPageDefinition\r\n{\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPages\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPages\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebPartPageWithCustomTemplate = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add custom web part page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPageWithCustomTemplate\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPageWithCustomTemplate\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWebPartPagesUnderFolders = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n \r\n \r\n \r\n Add web part page to folder\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // clients folder and pages\r\nvar clientsFolder = new FolderDefinition()\r\n{\r\n Name = \"Customers\"\r\n};\r\n\r\nvar clientMay2015Page = new WebPartPageDefinition\r\n{\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar clientJune2015Page = new WebPartPageDefinition\r\n{\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\n// parthers folder and pages\r\nvar parthersFolder = new FolderDefinition()\r\n{\r\n Name = \"Parthers\"\r\n};\r\n\r\nvar parther2014AnnualReport = new WebPartPageDefinition\r\n{\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar parther2015AnnualReport = new WebPartPageDefinition\r\n{\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n};\r\n\r\n// linking everything together\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n CanDeployWebPartPagesUnderFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests.CanDeployWebPartPagesUnderFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample WebPartPageDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web part pages\r\n Web part pages\r\n \r\n \r\n \r\n WebPartPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WebPartPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part page to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WebPartPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [SampleMetadata(Title = \"Add web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n public void CanDeployWebPartPages()\r\n {\r\n var customersReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customer reports\",\r\n FileName = \"Customers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parthesReportPage = new WebPartPageDefinition\r\n {\r\n Title = \"Parthers reports\",\r\n FileName = \"Parthers-report.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd2\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customersReportPage)\r\n .AddWebPartPage(parthesReportPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add custom web part page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPageWithCustomTemplate()\r\n {\r\n var customizedWebPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"Customers report\",\r\n FileName = \"Customers-report.aspx\",\r\n CustomPageLayout = \"___ a custom web part page template here ___ \"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWebPartPage(customizedWebPartPage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WebPartPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web part page to folder\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWebPartPagesUnderFolders()\r\n {\r\n // clients folder and pages\r\n var clientsFolder = new FolderDefinition()\r\n {\r\n Name = \"Customers\"\r\n };\r\n\r\n var clientMay2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"May 2015\",\r\n FileName = \"May-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var clientJune2015Page = new WebPartPageDefinition\r\n {\r\n Title = \"June 2015\",\r\n FileName = \"June-2015-analytics.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n // parthers folder and pages\r\n var parthersFolder = new FolderDefinition()\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var parther2014AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2014\",\r\n FileName = \"Annual-report-2014.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var parther2015AnnualReport = new WebPartPageDefinition\r\n {\r\n Title = \"Annual report 2015\",\r\n FileName = \"Annual-report-2015.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1,\r\n };\r\n\r\n // linking everything together\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(clientsFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(clientMay2015Page)\r\n .AddWebPartPage(clientJune2015Page);\r\n })\r\n .AddFolder(parthersFolder, folder =>\r\n {\r\n folder\r\n .AddWebPartPage(parther2014AnnualReport)\r\n .AddWebPartPage(parther2015AnnualReport);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WebPartPageDefinitionTests\r\n WebPartPageDefinitionTestsClass\r\n \r\n ClassWebPartPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WebPartPageDefinitionTests\r\n 0\r\n WebPartPageDefinitionTests.cs\r\n WebPartPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WebPartPageDefinitionTests.cs\r\n"); } public static class WelcomePageDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add web welcome page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newWebHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add list welcome page\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newListHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add folder welcome page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newFolderHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n};\r\n\r\nvar landingPageFolder = new FolderDefinition\r\n{\r\n Name = \"A folder with custom landing page\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n Welcome page\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n WelcomePageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WelcomePageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n [SampleMetadata(Title = \"Add list welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WelcomePageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n [SampleMetadata(Title = \"Add list welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n WelcomePageDefinitionTestsClass\r\n \r\n ClassWelcomePageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add web welcome page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newWebHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add list welcome page\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newListHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add folder welcome page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newFolderHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n};\r\n\r\nvar landingPageFolder = new FolderDefinition\r\n{\r\n Name = \"A folder with custom landing page\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n Welcome page\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n WelcomePageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WelcomePageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n [SampleMetadata(Title = \"Add list welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WelcomePageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n [SampleMetadata(Title = \"Add list welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n WelcomePageDefinitionTestsClass\r\n \r\n ClassWelcomePageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWelcomePageToWeb = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add web welcome page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newWebHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWelcomePageToList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add list welcome page\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newListHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWelcomePageToFolder = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add folder welcome page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newFolderHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n};\r\n\r\nvar landingPageFolder = new FolderDefinition\r\n{\r\n Name = \"A folder with custom landing page\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample WelcomePageDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n Welcome page\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n WelcomePageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WelcomePageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n [SampleMetadata(Title = \"Add list welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WelcomePageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n [SampleMetadata(Title = \"Add list welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n WelcomePageDefinitionTestsClass\r\n \r\n ClassWelcomePageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWelcomePageToWeb = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add web welcome page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newWebHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToWeb\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToWeb\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWelcomePageToList = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add list welcome page\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newListHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToList\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToList\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWelcomePageToFolder = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Add folder welcome page\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var newFolderHomePage = new WikiPageDefinition\r\n{\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n};\r\n\r\nvar welcomePage = new WelcomePageDefinition\r\n{\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n};\r\n\r\nvar landingPageFolder = new FolderDefinition\r\n{\r\n Name = \"A folder with custom landing page\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n CanDeployWelcomePageToFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests.CanDeployWelcomePageToFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample WelcomePageDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Welcome page\r\n Welcome page\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n WelcomePageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WelcomePageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n [SampleMetadata(Title = \"Add list welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WelcomePageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add web welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToWeb()\r\n {\r\n var newWebHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for web.aspx\",\r\n Content = \"Hello, this is a new web landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the web!\r\n Url = UrlUtility.CombineUrl(BuiltInListDefinitions.SitePages.GetListUrl(), newWebHomePage.FileName)\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWikiPage(newWebHomePage);\r\n })\r\n .AddWelcomePage(welcomePage);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n [SampleMetadata(Title = \"Add list welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToList()\r\n {\r\n var newListHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for list.aspx\",\r\n Content = \"Hello, this is a new list landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the list!\r\n Url = newListHomePage.FileName\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(newListHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WelcomePageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add folder welcome page\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWelcomePageToFolder()\r\n {\r\n var newFolderHomePage = new WikiPageDefinition\r\n {\r\n FileName = \"A new landing page for folder.aspx\",\r\n Content = \"Hello, this is a new folder landing page!\"\r\n };\r\n\r\n var welcomePage = new WelcomePageDefinition\r\n {\r\n // should be relating to the folder!\r\n Url = newFolderHomePage.FileName\r\n };\r\n\r\n var landingPageFolder = new FolderDefinition\r\n {\r\n Name = \"A folder with custom landing page\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(landingPageFolder, folder =>\r\n {\r\n folder\r\n .AddWikiPage(newFolderHomePage)\r\n .AddWelcomePage(welcomePage);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WelcomePageDefinitionTests\r\n WelcomePageDefinitionTestsClass\r\n \r\n ClassWelcomePageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WelcomePageDefinitionTests\r\n 0\r\n WelcomePageDefinitionTests.cs\r\n WelcomePageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WelcomePageDefinitionTests.cs\r\n"); } public static class WikiPageDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n \r\n \r\n \r\n Add wiki pages\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n CanDeploySimpleWikiPages\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests.CanDeploySimpleWikiPages\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n \r\n \r\n \r\n Add wiki pages to folders\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n CanDeployWikiPagesUnderFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests.CanDeployWikiPagesUnderFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n Wiki pages\r\n \r\n \r\n \r\n WikiPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WikiPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WikiPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n WikiPageDefinitionTestsClass\r\n \r\n ClassWikiPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n \r\n \r\n \r\n Add wiki pages\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n CanDeploySimpleWikiPages\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests.CanDeploySimpleWikiPages\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n \r\n \r\n \r\n Add wiki pages to folders\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n CanDeployWikiPagesUnderFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests.CanDeployWikiPagesUnderFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n Wiki pages\r\n \r\n \r\n \r\n WikiPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WikiPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WikiPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n WikiPageDefinitionTestsClass\r\n \r\n ClassWikiPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleWikiPages = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n \r\n \r\n \r\n Add wiki pages\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n CanDeploySimpleWikiPages\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests.CanDeploySimpleWikiPages\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWikiPagesUnderFolder = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n \r\n \r\n \r\n Add wiki pages to folders\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n CanDeployWikiPagesUnderFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests.CanDeployWikiPagesUnderFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample WikiPageDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n Wiki pages\r\n \r\n \r\n \r\n WikiPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WikiPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WikiPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n WikiPageDefinitionTestsClass\r\n \r\n ClassWikiPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleWikiPages = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n \r\n \r\n \r\n Add wiki pages\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n CanDeploySimpleWikiPages\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests.CanDeploySimpleWikiPages\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployWikiPagesUnderFolder = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n \r\n \r\n \r\n Add wiki pages to folders\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n CanDeployWikiPagesUnderFolder\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests.CanDeployWikiPagesUnderFolder\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample WikiPageDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Wiki pages\r\n Wiki pages\r\n \r\n \r\n \r\n WikiPageDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class WikiPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class WikiPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleWikiPages()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddWikiPage(DocWikiPages.AboutUs)\r\n .AddWikiPage(DocWikiPages.Contacts);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.WikiPageDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add wiki pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployWikiPagesUnderFolder()\r\n {\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list\r\n .AddFolder(DocFolders.WikiPages.News, newsFolder =>\r\n {\r\n newsFolder\r\n .AddWikiPage(DocWikiPages.NewCoffeeMachine)\r\n .AddWikiPage(DocWikiPages.NewSPMeta2Release);\r\n })\r\n .AddFolder(DocFolders.WikiPages.Archive, archiveFolder =>\r\n {\r\n archiveFolder\r\n .AddWikiPage(DocWikiPages.December2012News)\r\n .AddWikiPage(DocWikiPages.October2012News);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n WikiPageDefinitionTests\r\n WikiPageDefinitionTestsClass\r\n \r\n ClassWikiPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.WikiPageDefinitionTests\r\n 0\r\n WikiPageDefinitionTests.cs\r\n WikiPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\WikiPageDefinitionTests.cs\r\n"); } public static class XsltListViewWebPartDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var inventoryLibrary = new ListDefinition\r\n{\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list by URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var booksLibrary = new ListDefinition\r\n{\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list view by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var booksLibrary = new ListDefinition\r\n{\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n};\r\n\r\nvar booksView = new ListViewDefinition\r\n{\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListViewTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListViewTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n XsltListViewWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class XsltListViewWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class XsltListViewWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n XsltListViewWebPartDefinitionTestsClass\r\n \r\n ClassXsltListViewWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var inventoryLibrary = new ListDefinition\r\n{\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list by URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var booksLibrary = new ListDefinition\r\n{\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list view by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var booksLibrary = new ListDefinition\r\n{\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n};\r\n\r\nvar booksView = new ListViewDefinition\r\n{\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListViewTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListViewTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n XsltListViewWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class XsltListViewWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class XsltListViewWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n XsltListViewWebPartDefinitionTestsClass\r\n \r\n ClassXsltListViewWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanBindXsltListViewWebPartByListTitle = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var inventoryLibrary = new ListDefinition\r\n{\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanBindXsltListViewWebPartByListUrl = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list by URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var booksLibrary = new ListDefinition\r\n{\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanBindXsltListViewWebPartByListViewTitle = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list view by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var booksLibrary = new ListDefinition\r\n{\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n};\r\n\r\nvar booksView = new ListViewDefinition\r\n{\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListViewTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListViewTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample XsltListViewWebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n XsltListViewWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class XsltListViewWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class XsltListViewWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n XsltListViewWebPartDefinitionTestsClass\r\n \r\n ClassXsltListViewWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanBindXsltListViewWebPartByListTitle = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var inventoryLibrary = new ListDefinition\r\n{\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanBindXsltListViewWebPartByListUrl = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list by URL\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var booksLibrary = new ListDefinition\r\n{\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListUrl\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListUrl\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanBindXsltListViewWebPartByListViewTitle = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add XLVWP binded to list view by Title\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var booksLibrary = new ListDefinition\r\n{\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n};\r\n\r\nvar booksView = new ListViewDefinition\r\n{\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n};\r\n\r\nvar xsltListView = new XsltListViewWebPartDefinition\r\n{\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n CanBindXsltListViewWebPartByListViewTitle\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests.CanBindXsltListViewWebPartByListViewTitle\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample XsltListViewWebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Foundation\r\n SharePoint Foundation\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n XsltListViewWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class XsltListViewWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class XsltListViewWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListTitle()\r\n {\r\n var inventoryLibrary = new ListDefinition\r\n {\r\n Title = \"Inventory library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"InventoryLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Inventory Default View by List Title\",\r\n Id = \"m2InventoryView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListTitle = inventoryLibrary.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(inventoryLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list by URL\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListUrl()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Books Default View by List Url\",\r\n Id = \"m2BooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl()\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary)\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.XsltListViewWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add XLVWP binded to list view by Title\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanBindXsltListViewWebPartByListViewTitle()\r\n {\r\n var booksLibrary = new ListDefinition\r\n {\r\n Title = \"Books library\",\r\n Description = \"A document library.\",\r\n TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,\r\n Url = \"BooksLibrary\"\r\n };\r\n\r\n var booksView = new ListViewDefinition\r\n {\r\n Title = \"Popular Books\",\r\n Fields = new Collection<string>\r\n {\r\n BuiltInInternalFieldNames.Edit,\r\n BuiltInInternalFieldNames.ID,\r\n BuiltInInternalFieldNames.FileLeafRef\r\n },\r\n RowLimit = 10\r\n };\r\n\r\n var xsltListView = new XsltListViewWebPartDefinition\r\n {\r\n Title = \"Popular Books binding by List View Title\",\r\n Id = \"m2PopularBooksView\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\",\r\n ListUrl = booksLibrary.GetListUrl(),\r\n ViewName = booksView.Title\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Xslt List View provision\",\r\n FileName = \"xslt-listview-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddList(booksLibrary, list =>\r\n {\r\n list.AddListView(booksView);\r\n })\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddXsltListViewWebPart(xsltListView);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n XsltListViewWebPartDefinitionTests\r\n XsltListViewWebPartDefinitionTestsClass\r\n \r\n ClassXsltListViewWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.XsltListViewWebPartDefinitionTests\r\n 0\r\n XsltListViewWebPartDefinitionTests.cs\r\n XsltListViewWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-foundation-definitions\\XsltListViewWebPartDefinitionTests.cs\r\n"); } public static class AudienceDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add audience\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AudienceDefinitionTests\r\n CanDeploySimpleAudienceDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests.CanDeploySimpleAudienceDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests\r\n 0\r\n AudienceDefinitionTests.cs\r\n AudienceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\AudienceDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n AudienceDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class AudienceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AudienceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audience\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AudienceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AudienceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audience\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AudienceDefinitionTests\r\n AudienceDefinitionTestsClass\r\n \r\n ClassAudienceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests\r\n 0\r\n AudienceDefinitionTests.cs\r\n AudienceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\AudienceDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add audience\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AudienceDefinitionTests\r\n CanDeploySimpleAudienceDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests.CanDeploySimpleAudienceDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests\r\n 0\r\n AudienceDefinitionTests.cs\r\n AudienceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\AudienceDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n AudienceDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class AudienceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AudienceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audience\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AudienceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AudienceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audience\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AudienceDefinitionTests\r\n AudienceDefinitionTestsClass\r\n \r\n ClassAudienceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests\r\n 0\r\n AudienceDefinitionTests.cs\r\n AudienceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\AudienceDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleAudienceDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n Add audience\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AudienceDefinitionTests\r\n CanDeploySimpleAudienceDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests.CanDeploySimpleAudienceDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests\r\n 0\r\n AudienceDefinitionTests.cs\r\n AudienceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\AudienceDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample AudienceDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n AudienceDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class AudienceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AudienceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audience\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AudienceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AudienceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audience\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AudienceDefinitionTests\r\n AudienceDefinitionTestsClass\r\n \r\n ClassAudienceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests\r\n 0\r\n AudienceDefinitionTests.cs\r\n AudienceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\AudienceDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleAudienceDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n \r\n \r\n \r\n Add audience\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AudienceDefinitionTests\r\n CanDeploySimpleAudienceDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests.CanDeploySimpleAudienceDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests\r\n 0\r\n AudienceDefinitionTests.cs\r\n AudienceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\AudienceDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample AudienceDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Farm Model\r\n Farm Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Farm\r\n Farm\r\n \r\n \r\n \r\n AudienceDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class AudienceDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AudienceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audience\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class AudienceDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.AudienceDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add audience\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleAudienceDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n AudienceDefinitionTests\r\n AudienceDefinitionTestsClass\r\n \r\n ClassAudienceDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.AudienceDefinitionTests\r\n 0\r\n AudienceDefinitionTests.cs\r\n AudienceDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\AudienceDefinitionTests.cs\r\n"); } public static class ContactFieldControlDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add contact field web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContactFieldControlDefinitionTests\r\n CanDeploySimpleContactFieldControlDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests.CanDeploySimpleContactFieldControlDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests\r\n 0\r\n ContactFieldControlDefinitionTests.cs\r\n ContactFieldControlDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContactFieldControlDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ContactFieldControlDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContactFieldControlDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContactFieldControlDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add contact field web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContactFieldControlDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContactFieldControlDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add contact field web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContactFieldControlDefinitionTests\r\n ContactFieldControlDefinitionTestsClass\r\n \r\n ClassContactFieldControlDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests\r\n 0\r\n ContactFieldControlDefinitionTests.cs\r\n ContactFieldControlDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContactFieldControlDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add contact field web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContactFieldControlDefinitionTests\r\n CanDeploySimpleContactFieldControlDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests.CanDeploySimpleContactFieldControlDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests\r\n 0\r\n ContactFieldControlDefinitionTests.cs\r\n ContactFieldControlDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContactFieldControlDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ContactFieldControlDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContactFieldControlDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContactFieldControlDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add contact field web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContactFieldControlDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContactFieldControlDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add contact field web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContactFieldControlDefinitionTests\r\n ContactFieldControlDefinitionTestsClass\r\n \r\n ClassContactFieldControlDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests\r\n 0\r\n ContactFieldControlDefinitionTests.cs\r\n ContactFieldControlDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContactFieldControlDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleContactFieldControlDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add contact field web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContactFieldControlDefinitionTests\r\n CanDeploySimpleContactFieldControlDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests.CanDeploySimpleContactFieldControlDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests\r\n 0\r\n ContactFieldControlDefinitionTests.cs\r\n ContactFieldControlDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContactFieldControlDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ContactFieldControlDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ContactFieldControlDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContactFieldControlDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContactFieldControlDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add contact field web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContactFieldControlDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContactFieldControlDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add contact field web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContactFieldControlDefinitionTests\r\n ContactFieldControlDefinitionTestsClass\r\n \r\n ClassContactFieldControlDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests\r\n 0\r\n ContactFieldControlDefinitionTests.cs\r\n ContactFieldControlDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContactFieldControlDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleContactFieldControlDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add contact field web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContactFieldControlDefinitionTests\r\n CanDeploySimpleContactFieldControlDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests.CanDeploySimpleContactFieldControlDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests\r\n 0\r\n ContactFieldControlDefinitionTests.cs\r\n ContactFieldControlDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContactFieldControlDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ContactFieldControlDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n ContactFieldControlDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContactFieldControlDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContactFieldControlDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add contact field web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContactFieldControlDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContactFieldControlDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add contact field web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContactFieldControlDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContactFieldControlDefinitionTests\r\n ContactFieldControlDefinitionTestsClass\r\n \r\n ClassContactFieldControlDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContactFieldControlDefinitionTests\r\n 0\r\n ContactFieldControlDefinitionTests.cs\r\n ContactFieldControlDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContactFieldControlDefinitionTests.cs\r\n"); } public static class ContentByQueryWebPartDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add CQWP web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentByQueryWebPartDefinitionTests\r\n CanDeploySimpleContentByQueryWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests.CanDeploySimpleContentByQueryWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests\r\n 0\r\n ContentByQueryWebPartDefinitionTests.cs\r\n ContentByQueryWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContentByQueryWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n ContentByQueryWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentByQueryWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentByQueryWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CQWP web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentByQueryWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentByQueryWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CQWP web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentByQueryWebPartDefinitionTests\r\n ContentByQueryWebPartDefinitionTestsClass\r\n \r\n ClassContentByQueryWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests\r\n 0\r\n ContentByQueryWebPartDefinitionTests.cs\r\n ContentByQueryWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContentByQueryWebPartDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add CQWP web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentByQueryWebPartDefinitionTests\r\n CanDeploySimpleContentByQueryWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests.CanDeploySimpleContentByQueryWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests\r\n 0\r\n ContentByQueryWebPartDefinitionTests.cs\r\n ContentByQueryWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContentByQueryWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ContentByQueryWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentByQueryWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentByQueryWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CQWP web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentByQueryWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentByQueryWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CQWP web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentByQueryWebPartDefinitionTests\r\n ContentByQueryWebPartDefinitionTestsClass\r\n \r\n ClassContentByQueryWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests\r\n 0\r\n ContentByQueryWebPartDefinitionTests.cs\r\n ContentByQueryWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContentByQueryWebPartDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleContentByQueryWebPartDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add CQWP web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentByQueryWebPartDefinitionTests\r\n CanDeploySimpleContentByQueryWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests.CanDeploySimpleContentByQueryWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests\r\n 0\r\n ContentByQueryWebPartDefinitionTests.cs\r\n ContentByQueryWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContentByQueryWebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ContentByQueryWebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n ContentByQueryWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentByQueryWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentByQueryWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CQWP web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentByQueryWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentByQueryWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CQWP web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentByQueryWebPartDefinitionTests\r\n ContentByQueryWebPartDefinitionTestsClass\r\n \r\n ClassContentByQueryWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests\r\n 0\r\n ContentByQueryWebPartDefinitionTests.cs\r\n ContentByQueryWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContentByQueryWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleContentByQueryWebPartDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add CQWP web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentByQueryWebPartDefinitionTests\r\n CanDeploySimpleContentByQueryWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests.CanDeploySimpleContentByQueryWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests\r\n 0\r\n ContentByQueryWebPartDefinitionTests.cs\r\n ContentByQueryWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContentByQueryWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ContentByQueryWebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ContentByQueryWebPartDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ContentByQueryWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentByQueryWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CQWP web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ContentByQueryWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ContentByQueryWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add CQWP web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleContentByQueryWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ContentByQueryWebPartDefinitionTests\r\n ContentByQueryWebPartDefinitionTestsClass\r\n \r\n ClassContentByQueryWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ContentByQueryWebPartDefinitionTests\r\n 0\r\n ContentByQueryWebPartDefinitionTests.cs\r\n ContentByQueryWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ContentByQueryWebPartDefinitionTests.cs\r\n"); } public static class ControlDisplayTemplateDefinitionTests @@ -1507,115 +1543,115 @@ public static class ControlDisplayTemplateDefinitionTests public static class CustomDocumentIdProviderDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add Document ID provider\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CustomDocumentIdProviderDefinitionTests\r\n CanDeploySimpleCustomDocumentIdProviderDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests.CanDeploySimpleCustomDocumentIdProviderDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests\r\n 0\r\n CustomDocumentIdProviderDefinitionTests.cs\r\n CustomDocumentIdProviderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\CustomDocumentIdProviderDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n CustomDocumentIdProviderDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CustomDocumentIdProviderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CustomDocumentIdProviderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Document ID provider\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CustomDocumentIdProviderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CustomDocumentIdProviderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Document ID provider\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CustomDocumentIdProviderDefinitionTests\r\n CustomDocumentIdProviderDefinitionTestsClass\r\n \r\n ClassCustomDocumentIdProviderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests\r\n 0\r\n CustomDocumentIdProviderDefinitionTests.cs\r\n CustomDocumentIdProviderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\CustomDocumentIdProviderDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add Document ID provider\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CustomDocumentIdProviderDefinitionTests\r\n CanDeploySimpleCustomDocumentIdProviderDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests.CanDeploySimpleCustomDocumentIdProviderDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests\r\n 0\r\n CustomDocumentIdProviderDefinitionTests.cs\r\n CustomDocumentIdProviderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\CustomDocumentIdProviderDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n CustomDocumentIdProviderDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CustomDocumentIdProviderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CustomDocumentIdProviderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Document ID provider\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CustomDocumentIdProviderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CustomDocumentIdProviderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Document ID provider\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CustomDocumentIdProviderDefinitionTests\r\n CustomDocumentIdProviderDefinitionTestsClass\r\n \r\n ClassCustomDocumentIdProviderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests\r\n 0\r\n CustomDocumentIdProviderDefinitionTests.cs\r\n CustomDocumentIdProviderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\CustomDocumentIdProviderDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleCustomDocumentIdProviderDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add Document ID provider\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CustomDocumentIdProviderDefinitionTests\r\n CanDeploySimpleCustomDocumentIdProviderDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests.CanDeploySimpleCustomDocumentIdProviderDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests\r\n 0\r\n CustomDocumentIdProviderDefinitionTests.cs\r\n CustomDocumentIdProviderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\CustomDocumentIdProviderDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CustomDocumentIdProviderDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n CustomDocumentIdProviderDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CustomDocumentIdProviderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CustomDocumentIdProviderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Document ID provider\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CustomDocumentIdProviderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CustomDocumentIdProviderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Document ID provider\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CustomDocumentIdProviderDefinitionTests\r\n CustomDocumentIdProviderDefinitionTestsClass\r\n \r\n ClassCustomDocumentIdProviderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests\r\n 0\r\n CustomDocumentIdProviderDefinitionTests.cs\r\n CustomDocumentIdProviderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\CustomDocumentIdProviderDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleCustomDocumentIdProviderDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add Document ID provider\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CustomDocumentIdProviderDefinitionTests\r\n CanDeploySimpleCustomDocumentIdProviderDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests.CanDeploySimpleCustomDocumentIdProviderDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests\r\n 0\r\n CustomDocumentIdProviderDefinitionTests.cs\r\n CustomDocumentIdProviderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\CustomDocumentIdProviderDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CustomDocumentIdProviderDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n CustomDocumentIdProviderDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class CustomDocumentIdProviderDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CustomDocumentIdProviderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Document ID provider\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class CustomDocumentIdProviderDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.CustomDocumentIdProviderDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Document ID provider\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleCustomDocumentIdProviderDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n CustomDocumentIdProviderDefinitionTests\r\n CustomDocumentIdProviderDefinitionTestsClass\r\n \r\n ClassCustomDocumentIdProviderDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.CustomDocumentIdProviderDefinitionTests\r\n 0\r\n CustomDocumentIdProviderDefinitionTests.cs\r\n CustomDocumentIdProviderDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\CustomDocumentIdProviderDefinitionTests.cs\r\n"); } public static class HTMLFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add HTML field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HTMLFieldDefinitionTests\r\n CanDeploySimpleHTMLFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests.CanDeploySimpleHTMLFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests\r\n 0\r\n HTMLFieldDefinitionTests.cs\r\n HTMLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\HTMLFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n HTMLFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class HTMLFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HTMLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add HTML field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class HTMLFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HTMLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add HTML field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HTMLFieldDefinitionTests\r\n HTMLFieldDefinitionTestsClass\r\n \r\n ClassHTMLFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests\r\n 0\r\n HTMLFieldDefinitionTests.cs\r\n HTMLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\HTMLFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add HTML field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HTMLFieldDefinitionTests\r\n CanDeploySimpleHTMLFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests.CanDeploySimpleHTMLFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests\r\n 0\r\n HTMLFieldDefinitionTests.cs\r\n HTMLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\HTMLFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n HTMLFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class HTMLFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HTMLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add HTML field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class HTMLFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HTMLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add HTML field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HTMLFieldDefinitionTests\r\n HTMLFieldDefinitionTestsClass\r\n \r\n ClassHTMLFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests\r\n 0\r\n HTMLFieldDefinitionTests.cs\r\n HTMLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\HTMLFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleHTMLFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add HTML field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HTMLFieldDefinitionTests\r\n CanDeploySimpleHTMLFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests.CanDeploySimpleHTMLFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests\r\n 0\r\n HTMLFieldDefinitionTests.cs\r\n HTMLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\HTMLFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample HTMLFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n HTMLFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class HTMLFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HTMLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add HTML field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class HTMLFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HTMLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add HTML field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HTMLFieldDefinitionTests\r\n HTMLFieldDefinitionTestsClass\r\n \r\n ClassHTMLFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests\r\n 0\r\n HTMLFieldDefinitionTests.cs\r\n HTMLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\HTMLFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleHTMLFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add HTML field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HTMLFieldDefinitionTests\r\n CanDeploySimpleHTMLFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests.CanDeploySimpleHTMLFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests\r\n 0\r\n HTMLFieldDefinitionTests.cs\r\n HTMLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\HTMLFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample HTMLFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n HTMLFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class HTMLFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HTMLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add HTML field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class HTMLFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.HTMLFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add HTML field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleHTMLFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n HTMLFieldDefinitionTests\r\n HTMLFieldDefinitionTestsClass\r\n \r\n ClassHTMLFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.HTMLFieldDefinitionTests\r\n 0\r\n HTMLFieldDefinitionTests.cs\r\n HTMLFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\HTMLFieldDefinitionTests.cs\r\n"); } public static class ImageFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add image field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageFieldDefinitionTests\r\n CanDeploySimpleImageFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests.CanDeploySimpleImageFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests\r\n 0\r\n ImageFieldDefinitionTests.cs\r\n ImageFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n ImageFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ImageFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ImageFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageFieldDefinitionTests\r\n ImageFieldDefinitionTestsClass\r\n \r\n ClassImageFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests\r\n 0\r\n ImageFieldDefinitionTests.cs\r\n ImageFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add image field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageFieldDefinitionTests\r\n CanDeploySimpleImageFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests.CanDeploySimpleImageFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests\r\n 0\r\n ImageFieldDefinitionTests.cs\r\n ImageFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n ImageFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ImageFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ImageFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageFieldDefinitionTests\r\n ImageFieldDefinitionTestsClass\r\n \r\n ClassImageFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests\r\n 0\r\n ImageFieldDefinitionTests.cs\r\n ImageFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleImageFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add image field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageFieldDefinitionTests\r\n CanDeploySimpleImageFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests.CanDeploySimpleImageFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests\r\n 0\r\n ImageFieldDefinitionTests.cs\r\n ImageFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ImageFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n ImageFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ImageFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ImageFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageFieldDefinitionTests\r\n ImageFieldDefinitionTestsClass\r\n \r\n ClassImageFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests\r\n 0\r\n ImageFieldDefinitionTests.cs\r\n ImageFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleImageFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add image field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageFieldDefinitionTests\r\n CanDeploySimpleImageFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests.CanDeploySimpleImageFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests\r\n 0\r\n ImageFieldDefinitionTests.cs\r\n ImageFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ImageFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n ImageFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ImageFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ImageFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageFieldDefinitionTests\r\n ImageFieldDefinitionTestsClass\r\n \r\n ClassImageFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageFieldDefinitionTests\r\n 0\r\n ImageFieldDefinitionTests.cs\r\n ImageFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageFieldDefinitionTests.cs\r\n"); } public static class ImageRenditionDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add image rendition\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageRenditionDefinitionTests\r\n CanDeploySimpleImageRenditionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests.CanDeploySimpleImageRenditionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests\r\n 0\r\n ImageRenditionDefinitionTests.cs\r\n ImageRenditionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageRenditionDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n ImageRenditionDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ImageRenditionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageRenditionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image rendition\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ImageRenditionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageRenditionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image rendition\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageRenditionDefinitionTests\r\n ImageRenditionDefinitionTestsClass\r\n \r\n ClassImageRenditionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests\r\n 0\r\n ImageRenditionDefinitionTests.cs\r\n ImageRenditionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageRenditionDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add image rendition\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageRenditionDefinitionTests\r\n CanDeploySimpleImageRenditionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests.CanDeploySimpleImageRenditionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests\r\n 0\r\n ImageRenditionDefinitionTests.cs\r\n ImageRenditionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageRenditionDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n ImageRenditionDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ImageRenditionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageRenditionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image rendition\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ImageRenditionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageRenditionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image rendition\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageRenditionDefinitionTests\r\n ImageRenditionDefinitionTestsClass\r\n \r\n ClassImageRenditionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests\r\n 0\r\n ImageRenditionDefinitionTests.cs\r\n ImageRenditionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageRenditionDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleImageRenditionDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add image rendition\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageRenditionDefinitionTests\r\n CanDeploySimpleImageRenditionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests.CanDeploySimpleImageRenditionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests\r\n 0\r\n ImageRenditionDefinitionTests.cs\r\n ImageRenditionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageRenditionDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ImageRenditionDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n ImageRenditionDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ImageRenditionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageRenditionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image rendition\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ImageRenditionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageRenditionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image rendition\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageRenditionDefinitionTests\r\n ImageRenditionDefinitionTestsClass\r\n \r\n ClassImageRenditionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests\r\n 0\r\n ImageRenditionDefinitionTests.cs\r\n ImageRenditionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageRenditionDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleImageRenditionDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add image rendition\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageRenditionDefinitionTests\r\n CanDeploySimpleImageRenditionDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests.CanDeploySimpleImageRenditionDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests\r\n 0\r\n ImageRenditionDefinitionTests.cs\r\n ImageRenditionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageRenditionDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ImageRenditionDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n ImageRenditionDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ImageRenditionDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageRenditionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image rendition\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ImageRenditionDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ImageRenditionDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add image rendition\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleImageRenditionDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ImageRenditionDefinitionTests\r\n ImageRenditionDefinitionTestsClass\r\n \r\n ClassImageRenditionDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ImageRenditionDefinitionTests\r\n 0\r\n ImageRenditionDefinitionTests.cs\r\n ImageRenditionDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ImageRenditionDefinitionTests.cs\r\n"); } public static class ItemDisplayTemplateDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n \r\n \r\n \r\n Add item display template\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ItemDisplayTemplateDefinitionTests\r\n CanDeploySimpleItemDisplayTemplateDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests.CanDeploySimpleItemDisplayTemplateDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests\r\n 0\r\n ItemDisplayTemplateDefinitionTests.cs\r\n ItemDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ItemDisplayTemplateDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n Display Templates\r\n \r\n \r\n \r\n ItemDisplayTemplateDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ItemDisplayTemplateDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ItemDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ItemDisplayTemplateDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ItemDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ItemDisplayTemplateDefinitionTests\r\n ItemDisplayTemplateDefinitionTestsClass\r\n \r\n ClassItemDisplayTemplateDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests\r\n 0\r\n ItemDisplayTemplateDefinitionTests.cs\r\n ItemDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ItemDisplayTemplateDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add item display template\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ItemDisplayTemplateDefinitionTests\r\n CanDeploySimpleItemDisplayTemplateDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests.CanDeploySimpleItemDisplayTemplateDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests\r\n 0\r\n ItemDisplayTemplateDefinitionTests.cs\r\n ItemDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ItemDisplayTemplateDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ItemDisplayTemplateDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ItemDisplayTemplateDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ItemDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ItemDisplayTemplateDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ItemDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ItemDisplayTemplateDefinitionTests\r\n ItemDisplayTemplateDefinitionTestsClass\r\n \r\n ClassItemDisplayTemplateDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests\r\n 0\r\n ItemDisplayTemplateDefinitionTests.cs\r\n ItemDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ItemDisplayTemplateDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleItemDisplayTemplateDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n \r\n \r\n \r\n Add item display template\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ItemDisplayTemplateDefinitionTests\r\n CanDeploySimpleItemDisplayTemplateDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests.CanDeploySimpleItemDisplayTemplateDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests\r\n 0\r\n ItemDisplayTemplateDefinitionTests.cs\r\n ItemDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ItemDisplayTemplateDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample ItemDisplayTemplateDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n Display Templates\r\n \r\n \r\n \r\n ItemDisplayTemplateDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ItemDisplayTemplateDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ItemDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ItemDisplayTemplateDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ItemDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ItemDisplayTemplateDefinitionTests\r\n ItemDisplayTemplateDefinitionTestsClass\r\n \r\n ClassItemDisplayTemplateDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests\r\n 0\r\n ItemDisplayTemplateDefinitionTests.cs\r\n ItemDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ItemDisplayTemplateDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleItemDisplayTemplateDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add item display template\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ItemDisplayTemplateDefinitionTests\r\n CanDeploySimpleItemDisplayTemplateDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests.CanDeploySimpleItemDisplayTemplateDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests\r\n 0\r\n ItemDisplayTemplateDefinitionTests.cs\r\n ItemDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ItemDisplayTemplateDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample ItemDisplayTemplateDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n ItemDisplayTemplateDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class ItemDisplayTemplateDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ItemDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class ItemDisplayTemplateDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.ItemDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add item display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleItemDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n ItemDisplayTemplateDefinitionTests\r\n ItemDisplayTemplateDefinitionTestsClass\r\n \r\n ClassItemDisplayTemplateDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.ItemDisplayTemplateDefinitionTests\r\n 0\r\n ItemDisplayTemplateDefinitionTests.cs\r\n ItemDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\ItemDisplayTemplateDefinitionTests.cs\r\n"); } public static class JavaScriptDisplayTemplateDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add JavaScript display template\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JavaScriptDisplayTemplateDefinitionTests\r\n CanDeploySimpleJavaScriptDisplayTemplateDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests.CanDeploySimpleJavaScriptDisplayTemplateDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests\r\n 0\r\n JavaScriptDisplayTemplateDefinitionTests.cs\r\n JavaScriptDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\JavaScriptDisplayTemplateDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n JavaScriptDisplayTemplateDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class JavaScriptDisplayTemplateDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JavaScriptDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add JavaScript display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class JavaScriptDisplayTemplateDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JavaScriptDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add JavaScript display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JavaScriptDisplayTemplateDefinitionTests\r\n JavaScriptDisplayTemplateDefinitionTestsClass\r\n \r\n ClassJavaScriptDisplayTemplateDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests\r\n 0\r\n JavaScriptDisplayTemplateDefinitionTests.cs\r\n JavaScriptDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\JavaScriptDisplayTemplateDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add JavaScript display template\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JavaScriptDisplayTemplateDefinitionTests\r\n CanDeploySimpleJavaScriptDisplayTemplateDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests.CanDeploySimpleJavaScriptDisplayTemplateDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests\r\n 0\r\n JavaScriptDisplayTemplateDefinitionTests.cs\r\n JavaScriptDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\JavaScriptDisplayTemplateDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n JavaScriptDisplayTemplateDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class JavaScriptDisplayTemplateDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JavaScriptDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add JavaScript display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class JavaScriptDisplayTemplateDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JavaScriptDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add JavaScript display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JavaScriptDisplayTemplateDefinitionTests\r\n JavaScriptDisplayTemplateDefinitionTestsClass\r\n \r\n ClassJavaScriptDisplayTemplateDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests\r\n 0\r\n JavaScriptDisplayTemplateDefinitionTests.cs\r\n JavaScriptDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\JavaScriptDisplayTemplateDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleJavaScriptDisplayTemplateDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add JavaScript display template\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JavaScriptDisplayTemplateDefinitionTests\r\n CanDeploySimpleJavaScriptDisplayTemplateDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests.CanDeploySimpleJavaScriptDisplayTemplateDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests\r\n 0\r\n JavaScriptDisplayTemplateDefinitionTests.cs\r\n JavaScriptDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\JavaScriptDisplayTemplateDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample JavaScriptDisplayTemplateDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n JavaScriptDisplayTemplateDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class JavaScriptDisplayTemplateDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JavaScriptDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add JavaScript display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class JavaScriptDisplayTemplateDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JavaScriptDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add JavaScript display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JavaScriptDisplayTemplateDefinitionTests\r\n JavaScriptDisplayTemplateDefinitionTestsClass\r\n \r\n ClassJavaScriptDisplayTemplateDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests\r\n 0\r\n JavaScriptDisplayTemplateDefinitionTests.cs\r\n JavaScriptDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\JavaScriptDisplayTemplateDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleJavaScriptDisplayTemplateDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add JavaScript display template\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JavaScriptDisplayTemplateDefinitionTests\r\n CanDeploySimpleJavaScriptDisplayTemplateDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests.CanDeploySimpleJavaScriptDisplayTemplateDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests\r\n 0\r\n JavaScriptDisplayTemplateDefinitionTests.cs\r\n JavaScriptDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\JavaScriptDisplayTemplateDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample JavaScriptDisplayTemplateDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Display Templates\r\n Display Templates\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n JavaScriptDisplayTemplateDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class JavaScriptDisplayTemplateDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JavaScriptDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add JavaScript display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class JavaScriptDisplayTemplateDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.JavaScriptDisplayTemplateDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add JavaScript display template\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleJavaScriptDisplayTemplateDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n JavaScriptDisplayTemplateDefinitionTests\r\n JavaScriptDisplayTemplateDefinitionTestsClass\r\n \r\n ClassJavaScriptDisplayTemplateDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.JavaScriptDisplayTemplateDefinitionTests\r\n 0\r\n JavaScriptDisplayTemplateDefinitionTests.cs\r\n JavaScriptDisplayTemplateDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\JavaScriptDisplayTemplateDefinitionTests.cs\r\n"); } public static class LinkFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add link field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n LinkFieldDefinitionTests\r\n CanDeploySimpleLinkFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests.CanDeploySimpleLinkFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests\r\n 0\r\n LinkFieldDefinitionTests.cs\r\n LinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\LinkFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n LinkFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class LinkFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class LinkFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n LinkFieldDefinitionTests\r\n LinkFieldDefinitionTestsClass\r\n \r\n ClassLinkFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests\r\n 0\r\n LinkFieldDefinitionTests.cs\r\n LinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\LinkFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add link field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n LinkFieldDefinitionTests\r\n CanDeploySimpleLinkFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests.CanDeploySimpleLinkFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests\r\n 0\r\n LinkFieldDefinitionTests.cs\r\n LinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\LinkFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n LinkFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class LinkFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class LinkFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n LinkFieldDefinitionTests\r\n LinkFieldDefinitionTestsClass\r\n \r\n ClassLinkFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests\r\n 0\r\n LinkFieldDefinitionTests.cs\r\n LinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\LinkFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleLinkFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add link field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n LinkFieldDefinitionTests\r\n CanDeploySimpleLinkFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests.CanDeploySimpleLinkFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests\r\n 0\r\n LinkFieldDefinitionTests.cs\r\n LinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\LinkFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample LinkFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n LinkFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class LinkFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class LinkFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n LinkFieldDefinitionTests\r\n LinkFieldDefinitionTestsClass\r\n \r\n ClassLinkFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests\r\n 0\r\n LinkFieldDefinitionTests.cs\r\n LinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\LinkFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleLinkFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add link field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n LinkFieldDefinitionTests\r\n CanDeploySimpleLinkFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests.CanDeploySimpleLinkFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests\r\n 0\r\n LinkFieldDefinitionTests.cs\r\n LinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\LinkFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample LinkFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n LinkFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public class LinkFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\npublic class LinkFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.LinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n LinkFieldDefinitionTests\r\n LinkFieldDefinitionTestsClass\r\n \r\n ClassLinkFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.LinkFieldDefinitionTests\r\n 0\r\n LinkFieldDefinitionTests.cs\r\n LinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\LinkFieldDefinitionTests.cs\r\n"); } public static class MediaFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add media field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MediaFieldDefinitionTests\r\n CanDeploySimpleMediaFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests.CanDeploySimpleMediaFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests\r\n 0\r\n MediaFieldDefinitionTests.cs\r\n MediaFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\MediaFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n MediaFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class MediaFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MediaFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add media field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class MediaFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MediaFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add media field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MediaFieldDefinitionTests\r\n MediaFieldDefinitionTestsClass\r\n \r\n ClassMediaFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests\r\n 0\r\n MediaFieldDefinitionTests.cs\r\n MediaFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\MediaFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add media field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MediaFieldDefinitionTests\r\n CanDeploySimpleMediaFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests.CanDeploySimpleMediaFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests\r\n 0\r\n MediaFieldDefinitionTests.cs\r\n MediaFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\MediaFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n MediaFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class MediaFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MediaFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add media field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class MediaFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MediaFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add media field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MediaFieldDefinitionTests\r\n MediaFieldDefinitionTestsClass\r\n \r\n ClassMediaFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests\r\n 0\r\n MediaFieldDefinitionTests.cs\r\n MediaFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\MediaFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleMediaFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add media field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MediaFieldDefinitionTests\r\n CanDeploySimpleMediaFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests.CanDeploySimpleMediaFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests\r\n 0\r\n MediaFieldDefinitionTests.cs\r\n MediaFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\MediaFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample MediaFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n MediaFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class MediaFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MediaFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add media field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class MediaFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MediaFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add media field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MediaFieldDefinitionTests\r\n MediaFieldDefinitionTestsClass\r\n \r\n ClassMediaFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests\r\n 0\r\n MediaFieldDefinitionTests.cs\r\n MediaFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\MediaFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleMediaFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add media field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MediaFieldDefinitionTests\r\n CanDeploySimpleMediaFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests.CanDeploySimpleMediaFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests\r\n 0\r\n MediaFieldDefinitionTests.cs\r\n MediaFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\MediaFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample MediaFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n MediaFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class MediaFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MediaFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add media field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class MediaFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MediaFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add media field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleMediaFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n MediaFieldDefinitionTests\r\n MediaFieldDefinitionTestsClass\r\n \r\n ClassMediaFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.MediaFieldDefinitionTests\r\n 0\r\n MediaFieldDefinitionTests.cs\r\n MediaFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\MediaFieldDefinitionTests.cs\r\n"); } public static class PageLayoutAndSiteTemplateSettingsDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add page layout and site template settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests.CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n 0\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PageLayoutAndSiteTemplateSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PageLayoutAndSiteTemplateSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add page layout and site template settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PageLayoutAndSiteTemplateSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PageLayoutAndSiteTemplateSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add page layout and site template settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n PageLayoutAndSiteTemplateSettingsDefinitionTestsClass\r\n \r\n ClassPageLayoutAndSiteTemplateSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n 0\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Setup default web templates\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var sitePublishingInfrastructureFeature = BuiltInSiteFeatures.SharePointServerPublishingInfrastructure.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var webPublishingInfrastructureFeature = BuiltInWebFeatures.SharePointServerPublishing.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var settings = new PageLayoutAndSiteTemplateSettingsDefinition\r\n {\r\n // setup web templates\r\n UseDefinedWebTemplates = true,\r\n DefinedWebTemplates = new Collection<string>\r\n {\r\n BuiltInWebTemplates.Collaboration.BlankSite,\r\n BuiltInWebTemplates.Collaboration.Blog,\r\n BuiltInWebTemplates.Collaboration.TeamSite\r\n },\r\n\r\n // setup page layouts\r\n UseDefinedPageLayouts = true,\r\n DefinedPageLayouts = new Collection<string>\r\n {\r\n BuiltInPublishingPageLayoutNames.ArticleLeft,\r\n BuiltInPublishingPageLayoutNames.ArticleRight,\r\n BuiltInPublishingPageLayoutNames.ArticleLinks\r\n },\r\n\r\n // setup default page layout\r\n UseDefinedDefaultPageLayout = true,\r\n DefinedDefaultPageLayout = BuiltInPublishingPageLayoutNames.ArticleRight,\r\n };\r\n\r\n // create site model to enable publishing infrastructure\r\n // then deploy web model with page layout settings\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSiteFeature(sitePublishingInfrastructureFeature);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWebFeature(webPublishingInfrastructureFeature);\r\n web.AddPageLayoutAndSiteTemplateSettings(settings);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var sitePublishingInfrastructureFeature = BuiltInSiteFeatures.SharePointServerPublishingInfrastructure.Inherit(def =>\r\n{\r\n def.Enable();\r\n});\r\n\r\nvar webPublishingInfrastructureFeature = BuiltInWebFeatures.SharePointServerPublishing.Inherit(def =>\r\n{\r\n def.Enable();\r\n});\r\n\r\nvar settings = new PageLayoutAndSiteTemplateSettingsDefinition\r\n{\r\n // setup web templates\r\n UseDefinedWebTemplates = true,\r\n DefinedWebTemplates = new Collection<string>\r\n {\r\n BuiltInWebTemplates.Collaboration.BlankSite,\r\n BuiltInWebTemplates.Collaboration.Blog,\r\n BuiltInWebTemplates.Collaboration.TeamSite\r\n },\r\n\r\n // setup page layouts\r\n UseDefinedPageLayouts = true,\r\n DefinedPageLayouts = new Collection<string>\r\n {\r\n BuiltInPublishingPageLayoutNames.ArticleLeft,\r\n BuiltInPublishingPageLayoutNames.ArticleRight,\r\n BuiltInPublishingPageLayoutNames.ArticleLinks\r\n },\r\n\r\n // setup default page layout\r\n UseDefinedDefaultPageLayout = true,\r\n DefinedDefaultPageLayout = BuiltInPublishingPageLayoutNames.ArticleRight,\r\n};\r\n\r\n// create site model to enable publishing infrastructure\r\n// then deploy web model with page layout settings\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSiteFeature(sitePublishingInfrastructureFeature);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWebFeature(webPublishingInfrastructureFeature);\r\n web.AddPageLayoutAndSiteTemplateSettings(settings);\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests.CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n 0\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PageLayoutAndSiteTemplateSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PageLayoutAndSiteTemplateSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Setup default web templates\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var sitePublishingInfrastructureFeature = BuiltInSiteFeatures.SharePointServerPublishingInfrastructure.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var webPublishingInfrastructureFeature = BuiltInWebFeatures.SharePointServerPublishing.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var settings = new PageLayoutAndSiteTemplateSettingsDefinition\r\n {\r\n // setup web templates\r\n UseDefinedWebTemplates = true,\r\n DefinedWebTemplates = new Collection<string>\r\n {\r\n BuiltInWebTemplates.Collaboration.BlankSite,\r\n BuiltInWebTemplates.Collaboration.Blog,\r\n BuiltInWebTemplates.Collaboration.TeamSite\r\n },\r\n\r\n // setup page layouts\r\n UseDefinedPageLayouts = true,\r\n DefinedPageLayouts = new Collection<string>\r\n {\r\n BuiltInPublishingPageLayoutNames.ArticleLeft,\r\n BuiltInPublishingPageLayoutNames.ArticleRight,\r\n BuiltInPublishingPageLayoutNames.ArticleLinks\r\n },\r\n\r\n // setup default page layout\r\n UseDefinedDefaultPageLayout = true,\r\n DefinedDefaultPageLayout = BuiltInPublishingPageLayoutNames.ArticleRight,\r\n };\r\n\r\n // create site model to enable publishing infrastructure\r\n // then deploy web model with page layout settings\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSiteFeature(sitePublishingInfrastructureFeature);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWebFeature(webPublishingInfrastructureFeature);\r\n web.AddPageLayoutAndSiteTemplateSettings(settings);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PageLayoutAndSiteTemplateSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PageLayoutAndSiteTemplateSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Setup default web templates\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var sitePublishingInfrastructureFeature = BuiltInSiteFeatures.SharePointServerPublishingInfrastructure.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var webPublishingInfrastructureFeature = BuiltInWebFeatures.SharePointServerPublishing.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var settings = new PageLayoutAndSiteTemplateSettingsDefinition\r\n {\r\n // setup web templates\r\n UseDefinedWebTemplates = true,\r\n DefinedWebTemplates = new Collection<string>\r\n {\r\n BuiltInWebTemplates.Collaboration.BlankSite,\r\n BuiltInWebTemplates.Collaboration.Blog,\r\n BuiltInWebTemplates.Collaboration.TeamSite\r\n },\r\n\r\n // setup page layouts\r\n UseDefinedPageLayouts = true,\r\n DefinedPageLayouts = new Collection<string>\r\n {\r\n BuiltInPublishingPageLayoutNames.ArticleLeft,\r\n BuiltInPublishingPageLayoutNames.ArticleRight,\r\n BuiltInPublishingPageLayoutNames.ArticleLinks\r\n },\r\n\r\n // setup default page layout\r\n UseDefinedDefaultPageLayout = true,\r\n DefinedDefaultPageLayout = BuiltInPublishingPageLayoutNames.ArticleRight,\r\n };\r\n\r\n // create site model to enable publishing infrastructure\r\n // then deploy web model with page layout settings\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSiteFeature(sitePublishingInfrastructureFeature);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWebFeature(webPublishingInfrastructureFeature);\r\n web.AddPageLayoutAndSiteTemplateSettings(settings);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n PageLayoutAndSiteTemplateSettingsDefinitionTestsClass\r\n \r\n ClassPageLayoutAndSiteTemplateSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n 0\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add page layout and site template settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests.CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n 0\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample PageLayoutAndSiteTemplateSettingsDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PageLayoutAndSiteTemplateSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PageLayoutAndSiteTemplateSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add page layout and site template settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PageLayoutAndSiteTemplateSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PageLayoutAndSiteTemplateSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add page layout and site template settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n PageLayoutAndSiteTemplateSettingsDefinitionTestsClass\r\n \r\n ClassPageLayoutAndSiteTemplateSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n 0\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n \r\n \r\n \r\n Setup default web templates\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var sitePublishingInfrastructureFeature = BuiltInSiteFeatures.SharePointServerPublishingInfrastructure.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var webPublishingInfrastructureFeature = BuiltInWebFeatures.SharePointServerPublishing.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var settings = new PageLayoutAndSiteTemplateSettingsDefinition\r\n {\r\n // setup web templates\r\n UseDefinedWebTemplates = true,\r\n DefinedWebTemplates = new Collection<string>\r\n {\r\n BuiltInWebTemplates.Collaboration.BlankSite,\r\n BuiltInWebTemplates.Collaboration.Blog,\r\n BuiltInWebTemplates.Collaboration.TeamSite\r\n },\r\n\r\n // setup page layouts\r\n UseDefinedPageLayouts = true,\r\n DefinedPageLayouts = new Collection<string>\r\n {\r\n BuiltInPublishingPageLayoutNames.ArticleLeft,\r\n BuiltInPublishingPageLayoutNames.ArticleRight,\r\n BuiltInPublishingPageLayoutNames.ArticleLinks\r\n },\r\n\r\n // setup default page layout\r\n UseDefinedDefaultPageLayout = true,\r\n DefinedDefaultPageLayout = BuiltInPublishingPageLayoutNames.ArticleRight,\r\n };\r\n\r\n // create site model to enable publishing infrastructure\r\n // then deploy web model with page layout settings\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSiteFeature(sitePublishingInfrastructureFeature);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWebFeature(webPublishingInfrastructureFeature);\r\n web.AddPageLayoutAndSiteTemplateSettings(settings);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n var sitePublishingInfrastructureFeature = BuiltInSiteFeatures.SharePointServerPublishingInfrastructure.Inherit(def =>\r\n{\r\n def.Enable();\r\n});\r\n\r\nvar webPublishingInfrastructureFeature = BuiltInWebFeatures.SharePointServerPublishing.Inherit(def =>\r\n{\r\n def.Enable();\r\n});\r\n\r\nvar settings = new PageLayoutAndSiteTemplateSettingsDefinition\r\n{\r\n // setup web templates\r\n UseDefinedWebTemplates = true,\r\n DefinedWebTemplates = new Collection<string>\r\n {\r\n BuiltInWebTemplates.Collaboration.BlankSite,\r\n BuiltInWebTemplates.Collaboration.Blog,\r\n BuiltInWebTemplates.Collaboration.TeamSite\r\n },\r\n\r\n // setup page layouts\r\n UseDefinedPageLayouts = true,\r\n DefinedPageLayouts = new Collection<string>\r\n {\r\n BuiltInPublishingPageLayoutNames.ArticleLeft,\r\n BuiltInPublishingPageLayoutNames.ArticleRight,\r\n BuiltInPublishingPageLayoutNames.ArticleLinks\r\n },\r\n\r\n // setup default page layout\r\n UseDefinedDefaultPageLayout = true,\r\n DefinedDefaultPageLayout = BuiltInPublishingPageLayoutNames.ArticleRight,\r\n};\r\n\r\n// create site model to enable publishing infrastructure\r\n// then deploy web model with page layout settings\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddSiteFeature(sitePublishingInfrastructureFeature);\r\n});\r\n\r\nvar webModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddWebFeature(webPublishingInfrastructureFeature);\r\n web.AddPageLayoutAndSiteTemplateSettings(settings);\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(webModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests.CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n 0\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample PageLayoutAndSiteTemplateSettingsDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web site\r\n Web site\r\n \r\n \r\n \r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PageLayoutAndSiteTemplateSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PageLayoutAndSiteTemplateSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Setup default web templates\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var sitePublishingInfrastructureFeature = BuiltInSiteFeatures.SharePointServerPublishingInfrastructure.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var webPublishingInfrastructureFeature = BuiltInWebFeatures.SharePointServerPublishing.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var settings = new PageLayoutAndSiteTemplateSettingsDefinition\r\n {\r\n // setup web templates\r\n UseDefinedWebTemplates = true,\r\n DefinedWebTemplates = new Collection<string>\r\n {\r\n BuiltInWebTemplates.Collaboration.BlankSite,\r\n BuiltInWebTemplates.Collaboration.Blog,\r\n BuiltInWebTemplates.Collaboration.TeamSite\r\n },\r\n\r\n // setup page layouts\r\n UseDefinedPageLayouts = true,\r\n DefinedPageLayouts = new Collection<string>\r\n {\r\n BuiltInPublishingPageLayoutNames.ArticleLeft,\r\n BuiltInPublishingPageLayoutNames.ArticleRight,\r\n BuiltInPublishingPageLayoutNames.ArticleLinks\r\n },\r\n\r\n // setup default page layout\r\n UseDefinedDefaultPageLayout = true,\r\n DefinedDefaultPageLayout = BuiltInPublishingPageLayoutNames.ArticleRight,\r\n };\r\n\r\n // create site model to enable publishing infrastructure\r\n // then deploy web model with page layout settings\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSiteFeature(sitePublishingInfrastructureFeature);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWebFeature(webPublishingInfrastructureFeature);\r\n web.AddPageLayoutAndSiteTemplateSettings(settings);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PageLayoutAndSiteTemplateSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PageLayoutAndSiteTemplateSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Setup default web templates\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition()\r\n {\r\n var sitePublishingInfrastructureFeature = BuiltInSiteFeatures.SharePointServerPublishingInfrastructure.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var webPublishingInfrastructureFeature = BuiltInWebFeatures.SharePointServerPublishing.Inherit(def =>\r\n {\r\n def.Enable();\r\n });\r\n\r\n var settings = new PageLayoutAndSiteTemplateSettingsDefinition\r\n {\r\n // setup web templates\r\n UseDefinedWebTemplates = true,\r\n DefinedWebTemplates = new Collection<string>\r\n {\r\n BuiltInWebTemplates.Collaboration.BlankSite,\r\n BuiltInWebTemplates.Collaboration.Blog,\r\n BuiltInWebTemplates.Collaboration.TeamSite\r\n },\r\n\r\n // setup page layouts\r\n UseDefinedPageLayouts = true,\r\n DefinedPageLayouts = new Collection<string>\r\n {\r\n BuiltInPublishingPageLayoutNames.ArticleLeft,\r\n BuiltInPublishingPageLayoutNames.ArticleRight,\r\n BuiltInPublishingPageLayoutNames.ArticleLinks\r\n },\r\n\r\n // setup default page layout\r\n UseDefinedDefaultPageLayout = true,\r\n DefinedDefaultPageLayout = BuiltInPublishingPageLayoutNames.ArticleRight,\r\n };\r\n\r\n // create site model to enable publishing infrastructure\r\n // then deploy web model with page layout settings\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddSiteFeature(sitePublishingInfrastructureFeature);\r\n });\r\n\r\n var webModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddWebFeature(webPublishingInfrastructureFeature);\r\n web.AddPageLayoutAndSiteTemplateSettings(settings);\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(webModel);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n PageLayoutAndSiteTemplateSettingsDefinitionTestsClass\r\n \r\n ClassPageLayoutAndSiteTemplateSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n 0\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n PageLayoutAndSiteTemplateSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PageLayoutAndSiteTemplateSettingsDefinitionTests.cs\r\n"); } public static class PublishingPageDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add publishing pages\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var aboutPublishing = new PublishingPageDefinition\r\n{\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar howToPublising = new PublishingPageDefinition\r\n{\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n};\r\n\r\nvar publishingLinks = new PublishingPageDefinition\r\n{\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPage\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPage\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add publishing pages with custom layout\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n// it should be a file name of the file inside \'master page\' gallery\r\n\r\nvar customPublishing = new PublishingPageDefinition\r\n{\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPageWithCustomeLayout\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPageWithCustomeLayout\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add publishing pages to folders\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var archive = new FolderDefinition()\r\n{\r\n Name = \"Archive\"\r\n};\r\n\r\nvar year2014 = new FolderDefinition()\r\n{\r\n Name = \"2014\"\r\n};\r\n\r\nvar year2015 = new FolderDefinition()\r\n{\r\n Name = \"2015\"\r\n};\r\n\r\nvar oct2014Article = new PublishingPageDefinition\r\n{\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar dec2014Article = new PublishingPageDefinition\r\n{\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar oct2015Article = new PublishingPageDefinition\r\n{\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar dec2015Article = new PublishingPageDefinition\r\n{\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPageToFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPageToFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n Publishing pages\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n PublishingPageDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PublishingPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages with custom layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PublishingPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages with custom layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n PublishingPageDefinitionTestsClass\r\n \r\n ClassPublishingPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add publishing pages\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var aboutPublishing = new PublishingPageDefinition\r\n{\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar howToPublising = new PublishingPageDefinition\r\n{\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n};\r\n\r\nvar publishingLinks = new PublishingPageDefinition\r\n{\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPage\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPage\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add publishing pages with custom layout\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n// it should be a file name of the file inside \'master page\' gallery\r\n\r\nvar customPublishing = new PublishingPageDefinition\r\n{\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPageWithCustomeLayout\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPageWithCustomeLayout\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add publishing pages to folders\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var archive = new FolderDefinition()\r\n{\r\n Name = \"Archive\"\r\n};\r\n\r\nvar year2014 = new FolderDefinition()\r\n{\r\n Name = \"2014\"\r\n};\r\n\r\nvar year2015 = new FolderDefinition()\r\n{\r\n Name = \"2015\"\r\n};\r\n\r\nvar oct2014Article = new PublishingPageDefinition\r\n{\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar dec2014Article = new PublishingPageDefinition\r\n{\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar oct2015Article = new PublishingPageDefinition\r\n{\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar dec2015Article = new PublishingPageDefinition\r\n{\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPageToFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPageToFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n Publishing pages\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n PublishingPageDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PublishingPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages with custom layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PublishingPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages with custom layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n PublishingPageDefinitionTestsClass\r\n \r\n ClassPublishingPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPublishingPage = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add publishing pages\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var aboutPublishing = new PublishingPageDefinition\r\n{\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar howToPublising = new PublishingPageDefinition\r\n{\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n};\r\n\r\nvar publishingLinks = new PublishingPageDefinition\r\n{\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPage\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPage\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPublishingPageWithCustomeLayout = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add publishing pages with custom layout\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n// it should be a file name of the file inside \'master page\' gallery\r\n\r\nvar customPublishing = new PublishingPageDefinition\r\n{\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPageWithCustomeLayout\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPageWithCustomeLayout\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPublishingPageToFolders = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add publishing pages to folders\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var archive = new FolderDefinition()\r\n{\r\n Name = \"Archive\"\r\n};\r\n\r\nvar year2014 = new FolderDefinition()\r\n{\r\n Name = \"2014\"\r\n};\r\n\r\nvar year2015 = new FolderDefinition()\r\n{\r\n Name = \"2015\"\r\n};\r\n\r\nvar oct2014Article = new PublishingPageDefinition\r\n{\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar dec2014Article = new PublishingPageDefinition\r\n{\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar oct2015Article = new PublishingPageDefinition\r\n{\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar dec2015Article = new PublishingPageDefinition\r\n{\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPageToFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPageToFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample PublishingPageDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n Publishing pages\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n PublishingPageDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PublishingPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages with custom layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PublishingPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages with custom layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n PublishingPageDefinitionTestsClass\r\n \r\n ClassPublishingPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPublishingPage = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add publishing pages\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var aboutPublishing = new PublishingPageDefinition\r\n{\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar howToPublising = new PublishingPageDefinition\r\n{\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n};\r\n\r\nvar publishingLinks = new PublishingPageDefinition\r\n{\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPage\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPage\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPublishingPageWithCustomeLayout = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add publishing pages with custom layout\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n// it should be a file name of the file inside \'master page\' gallery\r\n\r\nvar customPublishing = new PublishingPageDefinition\r\n{\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPageWithCustomeLayout\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPageWithCustomeLayout\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployPublishingPageToFolders = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add publishing pages to folders\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var archive = new FolderDefinition()\r\n{\r\n Name = \"Archive\"\r\n};\r\n\r\nvar year2014 = new FolderDefinition()\r\n{\r\n Name = \"2014\"\r\n};\r\n\r\nvar year2015 = new FolderDefinition()\r\n{\r\n Name = \"2015\"\r\n};\r\n\r\nvar oct2014Article = new PublishingPageDefinition\r\n{\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar dec2014Article = new PublishingPageDefinition\r\n{\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar oct2015Article = new PublishingPageDefinition\r\n{\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar dec2015Article = new PublishingPageDefinition\r\n{\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n CanDeployPublishingPageToFolders\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests.CanDeployPublishingPageToFolders\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample PublishingPageDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Publishing pages\r\n Publishing pages\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n PublishingPageDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PublishingPageDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages with custom layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PublishingPageDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPage()\r\n {\r\n var aboutPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"About publishing\",\r\n FileName = \"About-publishing.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var howToPublising = new PublishingPageDefinition\r\n {\r\n Title = \"How to publish\",\r\n FileName = \"How-to-publish.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleRight\r\n };\r\n\r\n var publishingLinks = new PublishingPageDefinition\r\n {\r\n Title = \"Publishing links\",\r\n FileName = \"Publishing-links.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLinks\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(aboutPublishing)\r\n .AddPublishingPage(howToPublising)\r\n .AddPublishingPage(publishingLinks);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages with custom layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageWithCustomeLayout()\r\n {\r\n // PageLayoutFileName allows you to setup your own publishing page layout file name\r\n // it should be a file name of the file inside \'master page\' gallery\r\n\r\n var customPublishing = new PublishingPageDefinition\r\n {\r\n Title = \"Custom publishing\",\r\n FileName = \"Custom-publishing.aspx\",\r\n PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list\r\n .AddPublishingPage(customPublishing);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.PublishingPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing pages to folders\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeployPublishingPageToFolders()\r\n {\r\n var archive = new FolderDefinition()\r\n {\r\n Name = \"Archive\"\r\n };\r\n\r\n var year2014 = new FolderDefinition()\r\n {\r\n Name = \"2014\"\r\n };\r\n\r\n var year2015 = new FolderDefinition()\r\n {\r\n Name = \"2015\"\r\n };\r\n\r\n var oct2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2014\",\r\n FileName = \"october-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2014Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2014\",\r\n FileName = \"december-2014.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var oct2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"October 2015\",\r\n FileName = \"october-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var dec2015Article = new PublishingPageDefinition\r\n {\r\n Title = \"December 2015\",\r\n FileName = \"december-2015.aspx\",\r\n PageLayoutFileName = BuiltInPublishingPageLayoutNames.ArticleLeft\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n {\r\n list.AddFolder(archive, folder =>\r\n {\r\n folder\r\n .AddFolder(year2014, archive2014 =>\r\n {\r\n archive2014\r\n .AddPublishingPage(oct2014Article)\r\n .AddPublishingPage(dec2014Article);\r\n })\r\n .AddFolder(year2015, archive2015 =>\r\n {\r\n archive2015\r\n .AddPublishingPage(oct2015Article)\r\n .AddPublishingPage(dec2015Article);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageDefinitionTests\r\n PublishingPageDefinitionTestsClass\r\n \r\n ClassPublishingPageDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageDefinitionTests\r\n 0\r\n PublishingPageDefinitionTests.cs\r\n PublishingPageDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageDefinitionTests.cs\r\n"); } public static class PublishingPageLayoutDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add publishing page layout\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n var publishingPageContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n};\r\n\r\nvar publshingPageLayout = new PublishingPageLayoutDefinition\r\n{\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddContentType(publishingPageContentType);\r\n});\r\n\r\nvar rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(rootWebModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageLayoutDefinitionTests\r\n CanDeploySimplePublishingPageLayoutDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests.CanDeploySimplePublishingPageLayoutDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests\r\n 0\r\n PublishingPageLayoutDefinitionTests.cs\r\n PublishingPageLayoutDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageLayoutDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n Master page gallery\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n PublishingPageLayoutDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PublishingPageLayoutDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing page layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PublishingPageLayoutDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing page layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageLayoutDefinitionTests\r\n PublishingPageLayoutDefinitionTestsClass\r\n \r\n ClassPublishingPageLayoutDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests\r\n 0\r\n PublishingPageLayoutDefinitionTests.cs\r\n PublishingPageLayoutDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageLayoutDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n \r\n \r\n \r\n Add publishing page layout\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n var publishingPageContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n};\r\n\r\nvar publshingPageLayout = new PublishingPageLayoutDefinition\r\n{\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddContentType(publishingPageContentType);\r\n});\r\n\r\nvar rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(rootWebModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageLayoutDefinitionTests\r\n CanDeploySimplePublishingPageLayoutDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests.CanDeploySimplePublishingPageLayoutDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests\r\n 0\r\n PublishingPageLayoutDefinitionTests.cs\r\n PublishingPageLayoutDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageLayoutDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n Master page gallery\r\n \r\n \r\n \r\n PublishingPageLayoutDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PublishingPageLayoutDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing page layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PublishingPageLayoutDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing page layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageLayoutDefinitionTests\r\n PublishingPageLayoutDefinitionTestsClass\r\n \r\n ClassPublishingPageLayoutDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests\r\n 0\r\n PublishingPageLayoutDefinitionTests.cs\r\n PublishingPageLayoutDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageLayoutDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimplePublishingPageLayoutDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add publishing page layout\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n var publishingPageContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n};\r\n\r\nvar publshingPageLayout = new PublishingPageLayoutDefinition\r\n{\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddContentType(publishingPageContentType);\r\n});\r\n\r\nvar rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(rootWebModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageLayoutDefinitionTests\r\n CanDeploySimplePublishingPageLayoutDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests.CanDeploySimplePublishingPageLayoutDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests\r\n 0\r\n PublishingPageLayoutDefinitionTests.cs\r\n PublishingPageLayoutDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageLayoutDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample PublishingPageLayoutDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n Master page gallery\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n PublishingPageLayoutDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PublishingPageLayoutDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing page layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PublishingPageLayoutDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing page layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageLayoutDefinitionTests\r\n PublishingPageLayoutDefinitionTestsClass\r\n \r\n ClassPublishingPageLayoutDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests\r\n 0\r\n PublishingPageLayoutDefinitionTests.cs\r\n PublishingPageLayoutDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageLayoutDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimplePublishingPageLayoutDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n \r\n \r\n \r\n Add publishing page layout\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n var publishingPageContentType = new ContentTypeDefinition\r\n{\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n};\r\n\r\nvar publshingPageLayout = new PublishingPageLayoutDefinition\r\n{\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n};\r\n\r\nvar siteModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddContentType(publishingPageContentType);\r\n});\r\n\r\nvar rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n});\r\n\r\nDeployModel(siteModel);\r\nDeployModel(rootWebModel);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageLayoutDefinitionTests\r\n CanDeploySimplePublishingPageLayoutDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests.CanDeploySimplePublishingPageLayoutDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests\r\n 0\r\n PublishingPageLayoutDefinitionTests.cs\r\n PublishingPageLayoutDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageLayoutDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample PublishingPageLayoutDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Master page gallery\r\n Master page gallery\r\n \r\n \r\n \r\n PublishingPageLayoutDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class PublishingPageLayoutDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing page layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class PublishingPageLayoutDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.MasterPageDefinition\")]\r\n [SampleMetadata(Title = \"Add publishing page layout\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimplePublishingPageLayoutDefinition()\r\n {\r\n var publishingPageContentType = new ContentTypeDefinition\r\n {\r\n Name = \"M2 Article\",\r\n Id = new Guid(\"664CFB31-AFF3-433E-9F3F-D8812199B0BC\"),\r\n Group = \"SPMeta2.Samples\",\r\n ParentContentTypeId = BuiltInPublishingContentTypeId.ArticlePage\r\n };\r\n\r\n var publshingPageLayout = new PublishingPageLayoutDefinition\r\n {\r\n Title = \"M2 Article Left Layout\",\r\n FileName = \"m2-article-left.aspx\",\r\n // replace with your publishing page layout content\r\n Content = DefaultPublishingPageLayoutTemplates.ArticleLeft,\r\n AssociatedContentTypeId = publishingPageContentType.GetContentTypeId(),\r\n NeedOverride = true\r\n };\r\n\r\n var siteModel = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddContentType(publishingPageContentType);\r\n });\r\n\r\n var rootWebModel = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n {\r\n list.AddPublishingPageLayout(publshingPageLayout);\r\n });\r\n });\r\n\r\n DeployModel(siteModel);\r\n DeployModel(rootWebModel);\r\n }\r\n\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n PublishingPageLayoutDefinitionTests\r\n PublishingPageLayoutDefinitionTestsClass\r\n \r\n ClassPublishingPageLayoutDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.PublishingPageLayoutDefinitionTests\r\n 0\r\n PublishingPageLayoutDefinitionTests.cs\r\n PublishingPageLayoutDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\PublishingPageLayoutDefinitionTests.cs\r\n"); } public static class SearchConfigurationDefinitionTests @@ -1631,115 +1667,115 @@ public static class SearchConfigurationDefinitionTests public static class SearchResultDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add search result\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchResultDefinitionTests\r\n CanDeploySimpleSearchResultDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests.CanDeploySimpleSearchResultDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests\r\n 0\r\n SearchResultDefinitionTests.cs\r\n SearchResultDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchResultDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SearchResultDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SearchResultDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchResultDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search result\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SearchResultDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchResultDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search result\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchResultDefinitionTests\r\n SearchResultDefinitionTestsClass\r\n \r\n ClassSearchResultDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests\r\n 0\r\n SearchResultDefinitionTests.cs\r\n SearchResultDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchResultDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add search result\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchResultDefinitionTests\r\n CanDeploySimpleSearchResultDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests.CanDeploySimpleSearchResultDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests\r\n 0\r\n SearchResultDefinitionTests.cs\r\n SearchResultDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchResultDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SearchResultDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SearchResultDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchResultDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search result\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SearchResultDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchResultDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search result\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchResultDefinitionTests\r\n SearchResultDefinitionTestsClass\r\n \r\n ClassSearchResultDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests\r\n 0\r\n SearchResultDefinitionTests.cs\r\n SearchResultDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchResultDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSearchResultDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add search result\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchResultDefinitionTests\r\n CanDeploySimpleSearchResultDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests.CanDeploySimpleSearchResultDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests\r\n 0\r\n SearchResultDefinitionTests.cs\r\n SearchResultDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchResultDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample SearchResultDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SearchResultDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SearchResultDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchResultDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search result\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SearchResultDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchResultDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search result\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchResultDefinitionTests\r\n SearchResultDefinitionTestsClass\r\n \r\n ClassSearchResultDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests\r\n 0\r\n SearchResultDefinitionTests.cs\r\n SearchResultDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchResultDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSearchResultDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add search result\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchResultDefinitionTests\r\n CanDeploySimpleSearchResultDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests.CanDeploySimpleSearchResultDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests\r\n 0\r\n SearchResultDefinitionTests.cs\r\n SearchResultDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchResultDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample SearchResultDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SearchResultDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SearchResultDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchResultDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search result\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SearchResultDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchResultDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search result\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchResultDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchResultDefinitionTests\r\n SearchResultDefinitionTestsClass\r\n \r\n ClassSearchResultDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchResultDefinitionTests\r\n 0\r\n SearchResultDefinitionTests.cs\r\n SearchResultDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchResultDefinitionTests.cs\r\n"); } public static class SearchSettingsDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add search settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchSettingsDefinitionTests\r\n CanDeploySimpleSearchSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests.CanDeploySimpleSearchSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests\r\n 0\r\n SearchSettingsDefinitionTests.cs\r\n SearchSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchSettingsDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SearchSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SearchSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SearchSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchSettingsDefinitionTests\r\n SearchSettingsDefinitionTestsClass\r\n \r\n ClassSearchSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests\r\n 0\r\n SearchSettingsDefinitionTests.cs\r\n SearchSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchSettingsDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add search settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchSettingsDefinitionTests\r\n CanDeploySimpleSearchSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests.CanDeploySimpleSearchSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests\r\n 0\r\n SearchSettingsDefinitionTests.cs\r\n SearchSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchSettingsDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n SearchSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SearchSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SearchSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchSettingsDefinitionTests\r\n SearchSettingsDefinitionTestsClass\r\n \r\n ClassSearchSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests\r\n 0\r\n SearchSettingsDefinitionTests.cs\r\n SearchSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchSettingsDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSearchSettingsDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Add search settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchSettingsDefinitionTests\r\n CanDeploySimpleSearchSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests.CanDeploySimpleSearchSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests\r\n 0\r\n SearchSettingsDefinitionTests.cs\r\n SearchSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchSettingsDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample SearchSettingsDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n SearchSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SearchSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SearchSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchSettingsDefinitionTests\r\n SearchSettingsDefinitionTestsClass\r\n \r\n ClassSearchSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests\r\n 0\r\n SearchSettingsDefinitionTests.cs\r\n SearchSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchSettingsDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSearchSettingsDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add search settings\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchSettingsDefinitionTests\r\n CanDeploySimpleSearchSettingsDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests.CanDeploySimpleSearchSettingsDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests\r\n 0\r\n SearchSettingsDefinitionTests.cs\r\n SearchSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchSettingsDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample SearchSettingsDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Site collection\r\n Site collection\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n SearchSettingsDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SearchSettingsDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SearchSettingsDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SearchSettingsDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add search settings\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSearchSettingsDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SearchSettingsDefinitionTests\r\n SearchSettingsDefinitionTestsClass\r\n \r\n ClassSearchSettingsDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SearchSettingsDefinitionTests\r\n 0\r\n SearchSettingsDefinitionTests.cs\r\n SearchSettingsDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SearchSettingsDefinitionTests.cs\r\n"); } public static class SiteFeedWebPartDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add Site Feed web part\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n{\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteFeedWebPartDefinitionTests\r\n CanDeploySimpleSiteFeedWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests.CanDeploySimpleSiteFeedWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests\r\n 0\r\n SiteFeedWebPartDefinitionTests.cs\r\n SiteFeedWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SiteFeedWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n SiteFeedWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SiteFeedWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteFeedWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Site Feed web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SiteFeedWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteFeedWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Site Feed web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteFeedWebPartDefinitionTests\r\n SiteFeedWebPartDefinitionTestsClass\r\n \r\n ClassSiteFeedWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests\r\n 0\r\n SiteFeedWebPartDefinitionTests.cs\r\n SiteFeedWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SiteFeedWebPartDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add Site Feed web part\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n{\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteFeedWebPartDefinitionTests\r\n CanDeploySimpleSiteFeedWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests.CanDeploySimpleSiteFeedWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests\r\n 0\r\n SiteFeedWebPartDefinitionTests.cs\r\n SiteFeedWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SiteFeedWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n SiteFeedWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SiteFeedWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteFeedWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Site Feed web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SiteFeedWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteFeedWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Site Feed web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteFeedWebPartDefinitionTests\r\n SiteFeedWebPartDefinitionTestsClass\r\n \r\n ClassSiteFeedWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests\r\n 0\r\n SiteFeedWebPartDefinitionTests.cs\r\n SiteFeedWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SiteFeedWebPartDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSiteFeedWebPartDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add Site Feed web part\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n{\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteFeedWebPartDefinitionTests\r\n CanDeploySimpleSiteFeedWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests.CanDeploySimpleSiteFeedWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests\r\n 0\r\n SiteFeedWebPartDefinitionTests.cs\r\n SiteFeedWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SiteFeedWebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample SiteFeedWebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n SiteFeedWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SiteFeedWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteFeedWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Site Feed web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SiteFeedWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteFeedWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Site Feed web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteFeedWebPartDefinitionTests\r\n SiteFeedWebPartDefinitionTestsClass\r\n \r\n ClassSiteFeedWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests\r\n 0\r\n SiteFeedWebPartDefinitionTests.cs\r\n SiteFeedWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SiteFeedWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSiteFeedWebPartDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add Site Feed web part\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n{\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n};\r\n\r\nvar webPartPage = new WebPartPageDefinition\r\n{\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n};\r\n\r\nvar model = SPMeta2Model.NewWebModel(web =>\r\n{\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteFeedWebPartDefinitionTests\r\n CanDeploySimpleSiteFeedWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests.CanDeploySimpleSiteFeedWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests\r\n 0\r\n SiteFeedWebPartDefinitionTests.cs\r\n SiteFeedWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SiteFeedWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample SiteFeedWebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n SiteFeedWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SiteFeedWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteFeedWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Site Feed web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SiteFeedWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SiteFeedWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Site Feed web part\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSiteFeedWebPartDefinition()\r\n {\r\n var siteFeed = new SiteFeedWebPartDefinition\r\n {\r\n Title = \"Site Feed\",\r\n Id = \"m2SiteFeed\",\r\n ZoneIndex = 10,\r\n ZoneId = \"Main\"\r\n };\r\n\r\n var webPartPage = new WebPartPageDefinition\r\n {\r\n Title = \"M2 Site Feed provision\",\r\n FileName = \"site-feed-webpart-provision.aspx\",\r\n PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1\r\n };\r\n\r\n var model = SPMeta2Model.NewWebModel(web =>\r\n {\r\n web\r\n .AddWebFeature(BuiltInWebFeatures.SiteFeed.Inherit().Enable())\r\n .AddHostList(BuiltInListDefinitions.SitePages, list =>\r\n {\r\n list.AddWebPartPage(webPartPage, page =>\r\n {\r\n page.AddSiteFeedWebPart(siteFeed);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SiteFeedWebPartDefinitionTests\r\n SiteFeedWebPartDefinitionTestsClass\r\n \r\n ClassSiteFeedWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SiteFeedWebPartDefinitionTests\r\n 0\r\n SiteFeedWebPartDefinitionTests.cs\r\n SiteFeedWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SiteFeedWebPartDefinitionTests.cs\r\n"); } public static class SummaryLinkFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add summary link field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkFieldDefinitionTests\r\n CanDeploySimpleSummaryLinkFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests.CanDeploySimpleSummaryLinkFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests\r\n 0\r\n SummaryLinkFieldDefinitionTests.cs\r\n SummaryLinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SummaryLinkFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SummaryLinkFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add summary link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SummaryLinkFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add summary link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkFieldDefinitionTests\r\n SummaryLinkFieldDefinitionTestsClass\r\n \r\n ClassSummaryLinkFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests\r\n 0\r\n SummaryLinkFieldDefinitionTests.cs\r\n SummaryLinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add summary link field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkFieldDefinitionTests\r\n CanDeploySimpleSummaryLinkFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests.CanDeploySimpleSummaryLinkFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests\r\n 0\r\n SummaryLinkFieldDefinitionTests.cs\r\n SummaryLinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SummaryLinkFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SummaryLinkFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add summary link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SummaryLinkFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add summary link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkFieldDefinitionTests\r\n SummaryLinkFieldDefinitionTestsClass\r\n \r\n ClassSummaryLinkFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests\r\n 0\r\n SummaryLinkFieldDefinitionTests.cs\r\n SummaryLinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSummaryLinkFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add summary link field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkFieldDefinitionTests\r\n CanDeploySimpleSummaryLinkFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests.CanDeploySimpleSummaryLinkFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests\r\n 0\r\n SummaryLinkFieldDefinitionTests.cs\r\n SummaryLinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample SummaryLinkFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n SummaryLinkFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SummaryLinkFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add summary link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SummaryLinkFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add summary link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkFieldDefinitionTests\r\n SummaryLinkFieldDefinitionTestsClass\r\n \r\n ClassSummaryLinkFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests\r\n 0\r\n SummaryLinkFieldDefinitionTests.cs\r\n SummaryLinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSummaryLinkFieldDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add summary link field\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkFieldDefinitionTests\r\n CanDeploySimpleSummaryLinkFieldDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests.CanDeploySimpleSummaryLinkFieldDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests\r\n 0\r\n SummaryLinkFieldDefinitionTests.cs\r\n SummaryLinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample SummaryLinkFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SummaryLinkFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SummaryLinkFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add summary link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SummaryLinkFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkFieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add summary link field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkFieldDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkFieldDefinitionTests\r\n SummaryLinkFieldDefinitionTestsClass\r\n \r\n ClassSummaryLinkFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkFieldDefinitionTests\r\n 0\r\n SummaryLinkFieldDefinitionTests.cs\r\n SummaryLinkFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkFieldDefinitionTests.cs\r\n"); } public static class SummaryLinkWebPartDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add Summary Links web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkWebPartDefinitionTests\r\n CanDeploySimpleSummaryLinkWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests.CanDeploySimpleSummaryLinkWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests\r\n 0\r\n SummaryLinkWebPartDefinitionTests.cs\r\n SummaryLinkWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkWebPartDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n SummaryLinkWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SummaryLinkWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Summary Links web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SummaryLinkWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Summary Links web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkWebPartDefinitionTests\r\n SummaryLinkWebPartDefinitionTestsClass\r\n \r\n ClassSummaryLinkWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests\r\n 0\r\n SummaryLinkWebPartDefinitionTests.cs\r\n SummaryLinkWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkWebPartDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add Summary Links web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkWebPartDefinitionTests\r\n CanDeploySimpleSummaryLinkWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests.CanDeploySimpleSummaryLinkWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests\r\n 0\r\n SummaryLinkWebPartDefinitionTests.cs\r\n SummaryLinkWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkWebPartDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SummaryLinkWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SummaryLinkWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Summary Links web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SummaryLinkWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Summary Links web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkWebPartDefinitionTests\r\n SummaryLinkWebPartDefinitionTestsClass\r\n \r\n ClassSummaryLinkWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests\r\n 0\r\n SummaryLinkWebPartDefinitionTests.cs\r\n SummaryLinkWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkWebPartDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSummaryLinkWebPartDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n Add Summary Links web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkWebPartDefinitionTests\r\n CanDeploySimpleSummaryLinkWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests.CanDeploySimpleSummaryLinkWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests\r\n 0\r\n SummaryLinkWebPartDefinitionTests.cs\r\n SummaryLinkWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkWebPartDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample SummaryLinkWebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n SummaryLinkWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SummaryLinkWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Summary Links web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SummaryLinkWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Summary Links web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkWebPartDefinitionTests\r\n SummaryLinkWebPartDefinitionTestsClass\r\n \r\n ClassSummaryLinkWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests\r\n 0\r\n SummaryLinkWebPartDefinitionTests.cs\r\n SummaryLinkWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleSummaryLinkWebPartDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n \r\n \r\n \r\n Add Summary Links web part\r\n \r\n \r\n \r\n\r\n \r\n \r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkWebPartDefinitionTests\r\n CanDeploySimpleSummaryLinkWebPartDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests.CanDeploySimpleSummaryLinkWebPartDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests\r\n 0\r\n SummaryLinkWebPartDefinitionTests.cs\r\n SummaryLinkWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkWebPartDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample SummaryLinkWebPartDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Web parts\r\n Web parts\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Web Model\r\n Web Model\r\n \r\n \r\n \r\n SummaryLinkWebPartDefinitionTests\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class SummaryLinkWebPartDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Summary Links web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class SummaryLinkWebPartDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.SummaryLinkWebPartDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add Summary Links web part\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleSummaryLinkWebPartDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n SummaryLinkWebPartDefinitionTests\r\n SummaryLinkWebPartDefinitionTestsClass\r\n \r\n ClassSummaryLinkWebPartDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.SummaryLinkWebPartDefinitionTests\r\n 0\r\n SummaryLinkWebPartDefinitionTests.cs\r\n SummaryLinkWebPartDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\SummaryLinkWebPartDefinitionTests.cs\r\n"); } public static class TaxonomyFieldDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add taxonomy field\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // define a taxonomy\r\n// term store -> group -> term set -> terms\r\nvar taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar taxTermGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"M2 Taxonomy\"\r\n};\r\n\r\nvar taxTermSet = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Locations\"\r\n};\r\n\r\nvar taxTermLondon = new TaxonomyTermDefinition\r\n{\r\n Name = \"London\"\r\n};\r\n\r\nvar taxTermSydney = new TaxonomyTermDefinition\r\n{\r\n Name = \"Sydney\"\r\n};\r\n\r\n// define the field\r\nvar location = new TaxonomyFieldDefinition\r\n{\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyFieldDefinitionTests\r\n CanDeployTaxonomyField\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests.CanDeployTaxonomyField\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests\r\n 0\r\n TaxonomyFieldDefinitionTests.cs\r\n TaxonomyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyFieldDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n TaxonomyFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n \r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyFieldDefinitionTests\r\n TaxonomyFieldDefinitionTestsClass\r\n \r\n ClassTaxonomyFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests\r\n 0\r\n TaxonomyFieldDefinitionTests.cs\r\n TaxonomyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyFieldDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add taxonomy field\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // define a taxonomy\r\n// term store -> group -> term set -> terms\r\nvar taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar taxTermGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"M2 Taxonomy\"\r\n};\r\n\r\nvar taxTermSet = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Locations\"\r\n};\r\n\r\nvar taxTermLondon = new TaxonomyTermDefinition\r\n{\r\n Name = \"London\"\r\n};\r\n\r\nvar taxTermSydney = new TaxonomyTermDefinition\r\n{\r\n Name = \"Sydney\"\r\n};\r\n\r\n// define the field\r\nvar location = new TaxonomyFieldDefinition\r\n{\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyFieldDefinitionTests\r\n CanDeployTaxonomyField\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests.CanDeployTaxonomyField\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests\r\n 0\r\n TaxonomyFieldDefinitionTests.cs\r\n TaxonomyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyFieldDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n TaxonomyFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n \r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyFieldDefinitionTests\r\n TaxonomyFieldDefinitionTestsClass\r\n \r\n ClassTaxonomyFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests\r\n 0\r\n TaxonomyFieldDefinitionTests.cs\r\n TaxonomyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyFieldDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployTaxonomyField = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add taxonomy field\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // define a taxonomy\r\n// term store -> group -> term set -> terms\r\nvar taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar taxTermGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"M2 Taxonomy\"\r\n};\r\n\r\nvar taxTermSet = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Locations\"\r\n};\r\n\r\nvar taxTermLondon = new TaxonomyTermDefinition\r\n{\r\n Name = \"London\"\r\n};\r\n\r\nvar taxTermSydney = new TaxonomyTermDefinition\r\n{\r\n Name = \"Sydney\"\r\n};\r\n\r\n// define the field\r\nvar location = new TaxonomyFieldDefinition\r\n{\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyFieldDefinitionTests\r\n CanDeployTaxonomyField\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests.CanDeployTaxonomyField\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests\r\n 0\r\n TaxonomyFieldDefinitionTests.cs\r\n TaxonomyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyFieldDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample TaxonomyFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n TaxonomyFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n \r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyFieldDefinitionTests\r\n TaxonomyFieldDefinitionTestsClass\r\n \r\n ClassTaxonomyFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests\r\n 0\r\n TaxonomyFieldDefinitionTests.cs\r\n TaxonomyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeployTaxonomyField = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n \r\n \r\n \r\n Add taxonomy field\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // define a taxonomy\r\n// term store -> group -> term set -> terms\r\nvar taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar taxTermGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"M2 Taxonomy\"\r\n};\r\n\r\nvar taxTermSet = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Locations\"\r\n};\r\n\r\nvar taxTermLondon = new TaxonomyTermDefinition\r\n{\r\n Name = \"London\"\r\n};\r\n\r\nvar taxTermSydney = new TaxonomyTermDefinition\r\n{\r\n Name = \"Sydney\"\r\n};\r\n\r\n// define the field\r\nvar location = new TaxonomyFieldDefinition\r\n{\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyFieldDefinitionTests\r\n CanDeployTaxonomyField\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests.CanDeployTaxonomyField\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests\r\n 0\r\n TaxonomyFieldDefinitionTests.cs\r\n TaxonomyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyFieldDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample TaxonomyFieldDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Fields\r\n Fields\r\n \r\n \r\n \r\n TaxonomyFieldDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyFieldDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n \r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyFieldDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.FieldDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy field\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n\r\n public void CanDeployTaxonomyField()\r\n {\r\n // define a taxonomy\r\n // term store -> group -> term set -> terms\r\n var taxDefaultTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var taxTermGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"M2 Taxonomy\"\r\n };\r\n\r\n var taxTermSet = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Locations\"\r\n };\r\n\r\n var taxTermLondon = new TaxonomyTermDefinition\r\n {\r\n Name = \"London\"\r\n };\r\n\r\n var taxTermSydney = new TaxonomyTermDefinition\r\n {\r\n Name = \"Sydney\"\r\n };\r\n\r\n // define the field\r\n var location = new TaxonomyFieldDefinition\r\n {\r\n Title = \"Location\",\r\n InternalName = \"dcs_LocationTax\",\r\n Group = \"SPMeta2.Samples\",\r\n Id = new Guid(\"FE709AC2-E3A1-4A25-8F71-3480667CD98F\"),\r\n IsMulti = false,\r\n UseDefaultSiteCollectionTermStore = true,\r\n TermSetName = taxTermSet.Name\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site\r\n .AddHostTaxonomyTermStore(taxDefaultTermStore, store =>\r\n {\r\n store.AddTaxonomyTermGroup(taxTermGroup, group =>\r\n {\r\n group.AddTaxonomyTermSet(taxTermSet, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(taxTermLondon)\r\n .AddTaxonomyTerm(taxTermSydney);\r\n });\r\n });\r\n })\r\n .AddTaxonomyField(location);\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyFieldDefinitionTests\r\n TaxonomyFieldDefinitionTestsClass\r\n \r\n ClassTaxonomyFieldDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyFieldDefinitionTests\r\n 0\r\n TaxonomyFieldDefinitionTests.cs\r\n TaxonomyFieldDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyFieldDefinitionTests.cs\r\n"); } public static class TaxonomyTermDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add taxonomy terms\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model \r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // define term store\r\nvar defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\n// define group\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\n// define term sets\r\nvar smallBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Small Business\"\r\n};\r\n\r\nvar mediumBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Medium Business\"\r\n};\r\n\r\nvar enterpriseBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Enterprise Business\"\r\n};\r\n\r\n// define terms\r\nvar microsoft = new TaxonomyTermDefinition\r\n{\r\n Name = \"Microsoft\"\r\n};\r\n\r\nvar apple = new TaxonomyTermDefinition\r\n{\r\n Name = \"Apple\"\r\n};\r\n\r\nvar oracle = new TaxonomyTermDefinition\r\n{\r\n Name = \"Oracle\"\r\n};\r\n\r\nvar subPointSolutions = new TaxonomyTermDefinition\r\n{\r\n Name = \"SubPoint Solutions\"\r\n};\r\n\r\n// setup the model\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermDefinitionTests\r\n CanDeploySimpleTaxonomyTerms\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests.CanDeploySimpleTaxonomyTerms\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests\r\n 0\r\n TaxonomyTermDefinitionTests.cs\r\n TaxonomyTermDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n TaxonomyTermDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy terms\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model \r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy terms\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermDefinitionTests\r\n TaxonomyTermDefinitionTestsClass\r\n \r\n ClassTaxonomyTermDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests\r\n 0\r\n TaxonomyTermDefinitionTests.cs\r\n TaxonomyTermDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add taxonomy terms\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model \r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // define term store\r\nvar defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\n// define group\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\n// define term sets\r\nvar smallBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Small Business\"\r\n};\r\n\r\nvar mediumBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Medium Business\"\r\n};\r\n\r\nvar enterpriseBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Enterprise Business\"\r\n};\r\n\r\n// define terms\r\nvar microsoft = new TaxonomyTermDefinition\r\n{\r\n Name = \"Microsoft\"\r\n};\r\n\r\nvar apple = new TaxonomyTermDefinition\r\n{\r\n Name = \"Apple\"\r\n};\r\n\r\nvar oracle = new TaxonomyTermDefinition\r\n{\r\n Name = \"Oracle\"\r\n};\r\n\r\nvar subPointSolutions = new TaxonomyTermDefinition\r\n{\r\n Name = \"SubPoint Solutions\"\r\n};\r\n\r\n// setup the model\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermDefinitionTests\r\n CanDeploySimpleTaxonomyTerms\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests.CanDeploySimpleTaxonomyTerms\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests\r\n 0\r\n TaxonomyTermDefinitionTests.cs\r\n TaxonomyTermDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n TaxonomyTermDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy terms\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model \r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy terms\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermDefinitionTests\r\n TaxonomyTermDefinitionTestsClass\r\n \r\n ClassTaxonomyTermDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests\r\n 0\r\n TaxonomyTermDefinitionTests.cs\r\n TaxonomyTermDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTaxonomyTerms = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add taxonomy terms\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model \r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // define term store\r\nvar defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\n// define group\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\n// define term sets\r\nvar smallBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Small Business\"\r\n};\r\n\r\nvar mediumBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Medium Business\"\r\n};\r\n\r\nvar enterpriseBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Enterprise Business\"\r\n};\r\n\r\n// define terms\r\nvar microsoft = new TaxonomyTermDefinition\r\n{\r\n Name = \"Microsoft\"\r\n};\r\n\r\nvar apple = new TaxonomyTermDefinition\r\n{\r\n Name = \"Apple\"\r\n};\r\n\r\nvar oracle = new TaxonomyTermDefinition\r\n{\r\n Name = \"Oracle\"\r\n};\r\n\r\nvar subPointSolutions = new TaxonomyTermDefinition\r\n{\r\n Name = \"SubPoint Solutions\"\r\n};\r\n\r\n// setup the model\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermDefinitionTests\r\n CanDeploySimpleTaxonomyTerms\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests.CanDeploySimpleTaxonomyTerms\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests\r\n 0\r\n TaxonomyTermDefinitionTests.cs\r\n TaxonomyTermDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample TaxonomyTermDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n TaxonomyTermDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy terms\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model \r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy terms\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermDefinitionTests\r\n TaxonomyTermDefinitionTestsClass\r\n \r\n ClassTaxonomyTermDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests\r\n 0\r\n TaxonomyTermDefinitionTests.cs\r\n TaxonomyTermDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTaxonomyTerms = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add taxonomy terms\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model \r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n // define term store\r\nvar defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\n// define group\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\n// define term sets\r\nvar smallBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Small Business\"\r\n};\r\n\r\nvar mediumBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Medium Business\"\r\n};\r\n\r\nvar enterpriseBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Enterprise Business\"\r\n};\r\n\r\n// define terms\r\nvar microsoft = new TaxonomyTermDefinition\r\n{\r\n Name = \"Microsoft\"\r\n};\r\n\r\nvar apple = new TaxonomyTermDefinition\r\n{\r\n Name = \"Apple\"\r\n};\r\n\r\nvar oracle = new TaxonomyTermDefinition\r\n{\r\n Name = \"Oracle\"\r\n};\r\n\r\nvar subPointSolutions = new TaxonomyTermDefinition\r\n{\r\n Name = \"SubPoint Solutions\"\r\n};\r\n\r\n// setup the model\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermDefinitionTests\r\n CanDeploySimpleTaxonomyTerms\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests.CanDeploySimpleTaxonomyTerms\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests\r\n 0\r\n TaxonomyTermDefinitionTests.cs\r\n TaxonomyTermDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample TaxonomyTermDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n TaxonomyTermDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy terms\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model \r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy terms\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTerms()\r\n {\r\n // define term store\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n // define group\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n // define term sets\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n // define terms\r\n var microsoft = new TaxonomyTermDefinition\r\n {\r\n Name = \"Microsoft\"\r\n };\r\n\r\n var apple = new TaxonomyTermDefinition\r\n {\r\n Name = \"Apple\"\r\n };\r\n\r\n var oracle = new TaxonomyTermDefinition\r\n {\r\n Name = \"Oracle\"\r\n };\r\n\r\n var subPointSolutions = new TaxonomyTermDefinition\r\n {\r\n Name = \"SubPoint Solutions\"\r\n };\r\n\r\n // setup the model\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness, termSet =>\r\n {\r\n termSet.AddTaxonomyTerm(subPointSolutions);\r\n })\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness, termSet =>\r\n {\r\n termSet\r\n .AddTaxonomyTerm(microsoft)\r\n .AddTaxonomyTerm(apple)\r\n .AddTaxonomyTerm(oracle);\r\n });\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermDefinitionTests\r\n TaxonomyTermDefinitionTestsClass\r\n \r\n ClassTaxonomyTermDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermDefinitionTests\r\n 0\r\n TaxonomyTermDefinitionTests.cs\r\n TaxonomyTermDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermDefinitionTests.cs\r\n"); } public static class TaxonomyTermGroupDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add taxonomy term group\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n CanDeploySimpleTaxonomyGroup\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests.CanDeploySimpleTaxonomyGroup\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add taxonomy term groups\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar parthersGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Parthers\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n CanDeploySimpleTaxonomyGroups\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests.CanDeploySimpleTaxonomyGroups\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n TaxonomyTermGroupDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermGroupDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy term group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermGroupDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy term group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n TaxonomyTermGroupDefinitionTestsClass\r\n \r\n ClassTaxonomyTermGroupDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add taxonomy term group\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n CanDeploySimpleTaxonomyGroup\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests.CanDeploySimpleTaxonomyGroup\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add taxonomy term groups\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar parthersGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Parthers\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n CanDeploySimpleTaxonomyGroups\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests.CanDeploySimpleTaxonomyGroups\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n TaxonomyTermGroupDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermGroupDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy term group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermGroupDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy term group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n TaxonomyTermGroupDefinitionTestsClass\r\n \r\n ClassTaxonomyTermGroupDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTaxonomyGroup = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add taxonomy term group\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n CanDeploySimpleTaxonomyGroup\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests.CanDeploySimpleTaxonomyGroup\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTaxonomyGroups = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add taxonomy term groups\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar parthersGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Parthers\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n CanDeploySimpleTaxonomyGroups\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests.CanDeploySimpleTaxonomyGroups\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample TaxonomyTermGroupDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n TaxonomyTermGroupDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermGroupDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy term group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermGroupDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy term group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n TaxonomyTermGroupDefinitionTestsClass\r\n \r\n ClassTaxonomyTermGroupDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTaxonomyGroup = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add taxonomy term group\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n CanDeploySimpleTaxonomyGroup\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests.CanDeploySimpleTaxonomyGroup\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTaxonomyGroups = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add taxonomy term groups\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar parthersGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Parthers\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n CanDeploySimpleTaxonomyGroups\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests.CanDeploySimpleTaxonomyGroups\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample TaxonomyTermGroupDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n TaxonomyTermGroupDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermGroupDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy term group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermGroupDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy term group\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroup()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermGroupDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term groups\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyGroups()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var parthersGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Parthers\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore\r\n .AddTaxonomyTermGroup(clientsGroup)\r\n .AddTaxonomyTermGroup(parthersGroup);\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermGroupDefinitionTests\r\n TaxonomyTermGroupDefinitionTestsClass\r\n \r\n ClassTaxonomyTermGroupDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermGroupDefinitionTests\r\n 0\r\n TaxonomyTermGroupDefinitionTests.cs\r\n TaxonomyTermGroupDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermGroupDefinitionTests.cs\r\n"); } public static class TaxonomyTermLabelDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add taxonomy term label\r\n \r\n \r\n \r\n \r\n \r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermLabelDefinitionTests\r\n CanDeploySimpleTaxonomyTermLabelDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests.CanDeploySimpleTaxonomyTermLabelDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests\r\n 0\r\n TaxonomyTermLabelDefinitionTests.cs\r\n TaxonomyTermLabelDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermLabelDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n TaxonomyTermLabelDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermLabelDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermLabelDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term label\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermLabelDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermLabelDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term label\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermLabelDefinitionTests\r\n TaxonomyTermLabelDefinitionTestsClass\r\n \r\n ClassTaxonomyTermLabelDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests\r\n 0\r\n TaxonomyTermLabelDefinitionTests.cs\r\n TaxonomyTermLabelDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermLabelDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Add taxonomy term label\r\n \r\n \r\n \r\n \r\n \r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermLabelDefinitionTests\r\n CanDeploySimpleTaxonomyTermLabelDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests.CanDeploySimpleTaxonomyTermLabelDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests\r\n 0\r\n TaxonomyTermLabelDefinitionTests.cs\r\n TaxonomyTermLabelDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermLabelDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n TaxonomyTermLabelDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermLabelDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermLabelDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term label\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermLabelDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermLabelDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term label\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermLabelDefinitionTests\r\n TaxonomyTermLabelDefinitionTestsClass\r\n \r\n ClassTaxonomyTermLabelDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests\r\n 0\r\n TaxonomyTermLabelDefinitionTests.cs\r\n TaxonomyTermLabelDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermLabelDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTaxonomyTermLabelDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Add taxonomy term label\r\n \r\n \r\n \r\n \r\n \r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermLabelDefinitionTests\r\n CanDeploySimpleTaxonomyTermLabelDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests.CanDeploySimpleTaxonomyTermLabelDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests\r\n 0\r\n TaxonomyTermLabelDefinitionTests.cs\r\n TaxonomyTermLabelDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermLabelDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample TaxonomyTermLabelDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n TaxonomyTermLabelDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermLabelDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermLabelDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term label\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermLabelDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermLabelDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term label\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermLabelDefinitionTests\r\n TaxonomyTermLabelDefinitionTestsClass\r\n \r\n ClassTaxonomyTermLabelDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests\r\n 0\r\n TaxonomyTermLabelDefinitionTests.cs\r\n TaxonomyTermLabelDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermLabelDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTaxonomyTermLabelDefinition = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample Hidden Flag\r\n \r\n \r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Add taxonomy term label\r\n \r\n \r\n \r\n \r\n \r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermLabelDefinitionTests\r\n CanDeploySimpleTaxonomyTermLabelDefinition\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests.CanDeploySimpleTaxonomyTermLabelDefinition\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests\r\n 0\r\n TaxonomyTermLabelDefinitionTests.cs\r\n TaxonomyTermLabelDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermLabelDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample TaxonomyTermLabelDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n TaxonomyTermLabelDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermLabelDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermLabelDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term label\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n \r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermLabelDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermLabelDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term label\",\r\n Description = \"\"\r\n )]\r\n [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermLabelDefinition()\r\n {\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermLabelDefinitionTests\r\n TaxonomyTermLabelDefinitionTestsClass\r\n \r\n ClassTaxonomyTermLabelDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermLabelDefinitionTests\r\n 0\r\n TaxonomyTermLabelDefinitionTests.cs\r\n TaxonomyTermLabelDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermLabelDefinitionTests.cs\r\n"); } public static class TaxonomyTermSetDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Add taxonomy termsets\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar smallBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Small Business\"\r\n};\r\n\r\nvar mediumBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Medium Business\"\r\n};\r\n\r\nvar enterpriseBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Enterprise Business\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermSetDefinitionTests\r\n CanDeploySimpleTaxonomyTermSets\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests.CanDeploySimpleTaxonomyTermSets\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests\r\n 0\r\n TaxonomyTermSetDefinitionTests.cs\r\n TaxonomyTermSetDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermSetDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n TaxonomyTermSetDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermSetDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermSetDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy termsets\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermSetDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermSetDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy termsets\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermSetDefinitionTests\r\n TaxonomyTermSetDefinitionTestsClass\r\n \r\n ClassTaxonomyTermSetDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests\r\n 0\r\n TaxonomyTermSetDefinitionTests.cs\r\n TaxonomyTermSetDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermSetDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add taxonomy termsets\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar smallBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Small Business\"\r\n};\r\n\r\nvar mediumBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Medium Business\"\r\n};\r\n\r\nvar enterpriseBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Enterprise Business\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermSetDefinitionTests\r\n CanDeploySimpleTaxonomyTermSets\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests.CanDeploySimpleTaxonomyTermSets\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests\r\n 0\r\n TaxonomyTermSetDefinitionTests.cs\r\n TaxonomyTermSetDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermSetDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n TaxonomyTermSetDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermSetDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermSetDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy termsets\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermSetDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermSetDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy termsets\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermSetDefinitionTests\r\n TaxonomyTermSetDefinitionTestsClass\r\n \r\n ClassTaxonomyTermSetDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests\r\n 0\r\n TaxonomyTermSetDefinitionTests.cs\r\n TaxonomyTermSetDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermSetDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTaxonomyTermSets = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Add taxonomy termsets\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar smallBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Small Business\"\r\n};\r\n\r\nvar mediumBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Medium Business\"\r\n};\r\n\r\nvar enterpriseBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Enterprise Business\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermSetDefinitionTests\r\n CanDeploySimpleTaxonomyTermSets\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests.CanDeploySimpleTaxonomyTermSets\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests\r\n 0\r\n TaxonomyTermSetDefinitionTests.cs\r\n TaxonomyTermSetDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermSetDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample TaxonomyTermSetDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n TaxonomyTermSetDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermSetDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermSetDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy termsets\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermSetDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermSetDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy termsets\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermSetDefinitionTests\r\n TaxonomyTermSetDefinitionTestsClass\r\n \r\n ClassTaxonomyTermSetDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests\r\n 0\r\n TaxonomyTermSetDefinitionTests.cs\r\n TaxonomyTermSetDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermSetDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample CanDeploySimpleTaxonomyTermSets = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add taxonomy termsets\r\n \r\n \r\n \r\n\r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar clientsGroup = new TaxonomyTermGroupDefinition\r\n{\r\n Name = \"Clients\"\r\n};\r\n\r\nvar smallBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Small Business\"\r\n};\r\n\r\nvar mediumBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Medium Business\"\r\n};\r\n\r\nvar enterpriseBusiness = new TaxonomyTermSetDefinition\r\n{\r\n Name = \"Enterprise Business\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermSetDefinitionTests\r\n CanDeploySimpleTaxonomyTermSets\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests.CanDeploySimpleTaxonomyTermSets\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests\r\n 0\r\n TaxonomyTermSetDefinitionTests.cs\r\n TaxonomyTermSetDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermSetDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample TaxonomyTermSetDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n TaxonomyTermSetDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermSetDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermSetDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy termsets\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermSetDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermSetDefinition\")]\r\n\r\n [SampleMetadata(Title = \"Add taxonomy termsets\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void CanDeploySimpleTaxonomyTermSets()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var clientsGroup = new TaxonomyTermGroupDefinition\r\n {\r\n Name = \"Clients\"\r\n };\r\n\r\n var smallBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Small Business\"\r\n };\r\n\r\n var mediumBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Medium Business\"\r\n };\r\n\r\n var enterpriseBusiness = new TaxonomyTermSetDefinition\r\n {\r\n Name = \"Enterprise Business\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n termStore.AddTaxonomyTermGroup(clientsGroup, group =>\r\n {\r\n group\r\n .AddTaxonomyTermSet(smallBusiness)\r\n .AddTaxonomyTermSet(mediumBusiness)\r\n .AddTaxonomyTermSet(enterpriseBusiness);\r\n });\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermSetDefinitionTests\r\n TaxonomyTermSetDefinitionTestsClass\r\n \r\n ClassTaxonomyTermSetDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermSetDefinitionTests\r\n 0\r\n TaxonomyTermSetDefinitionTests.cs\r\n TaxonomyTermSetDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermSetDefinitionTests.cs\r\n"); } public static class TaxonomyTermStoreDefinitionTests { public static System.Collections.Generic.List SysAllSamples = new System.Collections.Generic.List(new SubPointSolutions.Docs.Code.Data.DocSample[] { -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add taxonomy term store by Name\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n Name = \"Managed Metadata Service\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n LookupTermStoreByName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests.LookupTermStoreByName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add default taxonomy term store\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n LookupDefaultSiteTermStore\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests.LookupDefaultSiteTermStore\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n") , -SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n TaxonomyTermStoreDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermStoreDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term store by Name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add default taxonomy term store\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermStoreDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term store by Name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add default taxonomy term store\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n TaxonomyTermStoreDefinitionTestsClass\r\n \r\n ClassTaxonomyTermStoreDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n") +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Add taxonomy term store by Name\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n Name = \"Managed Metadata Service\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n LookupTermStoreByName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests.LookupTermStoreByName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Add default taxonomy term store\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n LookupDefaultSiteTermStore\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests.LookupDefaultSiteTermStore\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n") , +SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n TaxonomyTermStoreDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermStoreDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term store by Name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add default taxonomy term store\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermStoreDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term store by Name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add default taxonomy term store\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n TaxonomyTermStoreDefinitionTestsClass\r\n \r\n ClassTaxonomyTermStoreDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n") }); - public static SubPointSolutions.Docs.Code.Data.DocSample LookupTermStoreByName = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add taxonomy term store by Name\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n Name = \"Managed Metadata Service\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n LookupTermStoreByName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests.LookupTermStoreByName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample LookupDefaultSiteTermStore = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Add default taxonomy term store\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n LookupDefaultSiteTermStore\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests.LookupDefaultSiteTermStore\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n"); - public static SubPointSolutions.Docs.Code.Data.DocSample TaxonomyTermStoreDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n TaxonomyTermStoreDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermStoreDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term store by Name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add default taxonomy term store\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermStoreDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term store by Name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add default taxonomy term store\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n TaxonomyTermStoreDefinitionTestsClass\r\n \r\n ClassTaxonomyTermStoreDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample LookupTermStoreByName = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Add taxonomy term store by Name\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n Name = \"Managed Metadata Service\"\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n LookupTermStoreByName\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests.LookupTermStoreByName\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample LookupDefaultSiteTermStore = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n true\r\n false\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n \r\n \r\n \r\n Add default taxonomy term store\r\n \r\n \r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n{\r\n UseDefaultSiteCollectionTermStore = true\r\n};\r\n\r\nvar model = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n});\r\n\r\nDeployModel(model);\r\n\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n LookupDefaultSiteTermStore\r\n \r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests.LookupDefaultSiteTermStore\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n"); + public static SubPointSolutions.Docs.Code.Data.DocSample TaxonomyTermStoreDefinitionTestsClass = SubPointSolutions.Docs.Code.Data.DocSample.FromXml("\r\n\r\n false\r\n true\r\n \r\n \r\n SharePoint Runtime\r\n \r\n SharePoint Standard\r\n SharePoint Standard\r\n \r\n \r\n \r\n Sample M2 Model\r\n \r\n Site Collection Model\r\n Site Collection Model\r\n \r\n \r\n \r\n Sample Category\r\n \r\n Taxonomy\r\n Taxonomy\r\n \r\n \r\n \r\n TaxonomyTermStoreDefinitionTests\r\n \r\n \r\n \r\n\r\n \r\n \r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public class TaxonomyTermStoreDefinitionTests : ProvisionTestBase\r\n {\r\n #region methods\r\n\r\n \r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term store by Name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add default taxonomy term store\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n }\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\npublic class TaxonomyTermStoreDefinitionTests : ProvisionTestBase\r\n{\r\n #region methods\r\n\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add taxonomy term store by Name\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupTermStoreByName()\r\n {\r\n var mmsTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n Name = \"Managed Metadata Service\"\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(mmsTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n [TestMethod]\r\n [TestCategory(\"Docs.TaxonomyTermStoreDefinition\")]\r\n [SampleMetadata(Title = \"Add default taxonomy term store\",\r\n Description = \"\"\r\n )]\r\n //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)]\r\n public void LookupDefaultSiteTermStore()\r\n {\r\n var defaultSiteTermStore = new TaxonomyTermStoreDefinition\r\n {\r\n UseDefaultSiteCollectionTermStore = true\r\n };\r\n\r\n var model = SPMeta2Model.NewSiteModel(site =>\r\n {\r\n site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>\r\n {\r\n // do stuff, add groups, term sets\r\n });\r\n });\r\n\r\n DeployModel(model);\r\n }\r\n\r\n #endregion\r\n}\r\n\r\n cs\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions\r\n TaxonomyTermStoreDefinitionTests\r\n TaxonomyTermStoreDefinitionTestsClass\r\n \r\n ClassTaxonomyTermStoreDefinitionTestsClass\r\n SPMeta2.Docs.ProvisionSamples.Provision.Definitions.TaxonomyTermStoreDefinitionTests\r\n 0\r\n TaxonomyTermStoreDefinitionTests.cs\r\n TaxonomyTermStoreDefinitionTests\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\r\n ..\\..\\Views\\SPMeta2\\reference\\sp-standard-definitions\\TaxonomyTermStoreDefinitionTests.cs\r\n"); } public static class WebNavigationSettingsDefinitionTests diff --git a/SPMeta2/SubPointSolutions.Docs/SubPointSolutions.Docs.csproj b/SPMeta2/SubPointSolutions.Docs/SubPointSolutions.Docs.csproj index d11d4331f..3eec19cf1 100644 --- a/SPMeta2/SubPointSolutions.Docs/SubPointSolutions.Docs.csproj +++ b/SPMeta2/SubPointSolutions.Docs/SubPointSolutions.Docs.csproj @@ -415,6 +415,7 @@ + @@ -830,6 +831,7 @@ + diff --git a/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/kb/kb-m2-000010.md b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/kb/kb-m2-000010.md new file mode 100644 index 000000000..6c09d9eb4 --- /dev/null +++ b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/kb/kb-m2-000010.md @@ -0,0 +1,16 @@ +--- +Title: Field gets auto-generated InternalName in a list +Order: 1010 +--- + +## Field gets auto-generated InternalName in a list + +### Problem +While adding field directly to a list via .AddField() syntax, target field gets auto-generated InternalName. + +## Explanation +By default SharePoint would generate InternalName for a list scoped fields. +That can be controlled via [Field.AddFieldOptions property](https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spaddfieldoptions.ASPX). + +### Solution +While adding field directly to a list FieldDefinition.AddFieldOption should be set to "AddFieldInternalNameHint" so that field would get the right internal name within a list. \ No newline at end of file diff --git a/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/ProvisionServices.cs b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/ProvisionServices.cs new file mode 100644 index 000000000..c325c5fee --- /dev/null +++ b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/ProvisionServices.cs @@ -0,0 +1,294 @@ +using Microsoft.SharePoint; +using Microsoft.SharePoint.Administration; +using Microsoft.SharePoint.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using SPMeta2.Common; +using SPMeta2.CSOM.Services; +using SPMeta2.CSOM.Standard.Services; +using SPMeta2.Definitions.Webparts; +using SPMeta2.Docs.ProvisionSamples.Base; +using SPMeta2.Enumerations; +using SPMeta2.SSOM.Services; +using SPMeta2.SSOM.Standard.Services; +using SPMeta2.Syntax.Default; +using SPMeta2.Utils; +using System; +using SPMeta2.Services; + +namespace SubPointSolutions.Docs.Views.Views.SPMeta2.reference +{ + [TestClass] + public class ProvisionServices : ProvisionTestBase + { + #region methods + + [TestMethod] + [TestCategory("Docs.ProvisionServices")] + public void Deploy_SiteModel_CSOM() + { + // setup url + var siteUrl = ""; + + // create you model + var siteModel = SPMeta2Model.NewSiteModel(site => + { + + }); + + // setup client context + using (var clientContext = new ClientContext(siteUrl)) + { + // deploy site model with SharePoint Foundation CSOM API + var foundationProvisionService = new CSOMProvisionService(); + foundationProvisionService.DeploySiteModel(clientContext, siteModel); + + // deploy site model with SharePoint Standard CSOM API + var standardProvisionService = new StandardCSOMProvisionService(); + standardProvisionService.DeploySiteModel(clientContext, siteModel); + } + } + + [TestMethod] + [TestCategory("Docs.ProvisionServices")] + public void Deploy_WebModel_CSOM() + { + // setup url + var webUrl = ""; + + // create you model + var webModel = SPMeta2Model.NewWebModel(web => + { + + }); + + // setup client context + using (var clientContext = new ClientContext(webUrl)) + { + // deploy web model with SharePoint Foundation CSOM API + var foundationProvisionService = new CSOMProvisionService(); + foundationProvisionService.DeployWebModel(clientContext, webModel); + + // deploy web model with SharePoint Standard CSOM API + var standardProvisionService = new StandardCSOMProvisionService(); + standardProvisionService.DeployWebModel(clientContext, webModel); + } + } + + #region ssom + + [TestMethod] + [TestCategory("Docs.ProvisionServices")] + public void Deploy_FarmModel_SSOM() + { + // create you model + var farmModel = SPMeta2Model.NewFarmModel(farm => + { + + }); + + var spFarm = SPFarm.Local; + + // deploy site model with SharePoint Foundation SSOM API + var foundationProvisionService = new SSOMProvisionService(); + foundationProvisionService.DeployFarmModel(spFarm, farmModel); + + // deploy site model with SharePoint Standard SSOM API + var standardProvisionService = new StandardSSOMProvisionService(); + standardProvisionService.DeployFarmModel(spFarm, farmModel); + } + + [TestMethod] + [TestCategory("Docs.ProvisionServices")] + public void Deploy_WebApplicationModel_SSOM() + { + // setup url + var webAppUrl = ""; + + // create you model + var webAppModel = SPMeta2Model.NewWebApplicationModel(webApp => + { + + }); + + var spWebApp = SPWebApplication.Lookup(new Uri(webAppUrl)); + + // deploy site model with SharePoint Foundation SSOM API + var foundationProvisionService = new SSOMProvisionService(); + foundationProvisionService.DeployWebApplicationModel(spWebApp, webAppModel); + + // deploy site model with SharePoint Standard SSOM API + var standardProvisionService = new StandardSSOMProvisionService(); + standardProvisionService.DeployWebApplicationModel(spWebApp, webAppModel); + } + + [TestMethod] + [TestCategory("Docs.ProvisionServices")] + public void Deploy_SiteModel_SSOM() + { + // setup url + var siteUrl = ""; + + // create you model + var siteModel = SPMeta2Model.NewSiteModel(site => + { + + }); + + using (var spSite = new SPSite(siteUrl)) + { + // deploy site model with SharePoint Foundation SSOM API + var foundationProvisionService = new SSOMProvisionService(); + foundationProvisionService.DeploySiteModel(spSite, siteModel); + + // deploy site model with SharePoint Standard SSOM API + var standardProvisionService = new StandardSSOMProvisionService(); + standardProvisionService.DeploySiteModel(spSite, siteModel); + } + } + + [TestMethod] + [TestCategory("Docs.ProvisionServices")] + public void Deploy_WebModel_SSOM() + { + // setup url + var webUrl = ""; + + // create you model + var webModel = SPMeta2Model.NewWebModel(web => + { + + }); + + using (var spSite = new SPSite(webUrl)) + { + using (var spWeb = spSite.OpenWeb()) + { + // deploy site model with SharePoint Foundation SSOM API + var foundationProvisionService = new SSOMProvisionService(); + foundationProvisionService.DeployWebModel(spWeb, webModel); + + // deploy site model with SharePoint Standard SSOM API + var standardProvisionService = new StandardSSOMProvisionService(); + standardProvisionService.DeployWebModel(spWeb, webModel); + } + } + } + + #endregion + + #region incremental + + [TestMethod] + [TestCategory("Docs.ProvisionServices")] + public void DeployIncrementally_Default_SSOM() + { + // setup url + var siteUrl = ""; + + // create you models + var siteModel = SPMeta2Model.NewSiteModel(site => + { + + }); + + var webModel = SPMeta2Model.NewWebModel(web => + { + + }); + + using (var spSite = new SPSite(siteUrl)) + { + using (var spWeb = spSite.OpenWeb()) + { + // deploy site model incrementally + var provisionService = new StandardSSOMProvisionService(); + provisionService.DeploySiteModelIncrementally(spSite, siteModel, "MySiteModelId"); + + // deploy web model incrementally + provisionService.DeployWebModelIncrementally(spWeb, webModel, "MyWebModelId"); + } + } + } + + [TestMethod] + [TestCategory("Docs.ProvisionServices")] + public void DeployIncrementally_Default_CSOM() + { + // setup web + var siteUrl = ""; + + // create you models + var siteModel = SPMeta2Model.NewSiteModel(site => + { + + }); + + var webModel = SPMeta2Model.NewWebModel(web => + { + + }); + + // setup client context + using (var clientContext = new ClientContext(siteUrl)) + { + // deploy site model incrementally + var provisionService = new StandardCSOMProvisionService(); + provisionService.DeploySiteModelIncrementally(clientContext, siteModel, "MySiteModelId"); + + // deploy web model incrementally + provisionService.DeployWebModelIncrementally(clientContext, webModel, "MyWebModelId"); + } + } + + + [TestMethod] + [TestCategory("Docs.ProvisionServices")] + public void DeployIncrementally_NormalSetup_CSOM() + { + // setup web + var siteUrl = ""; + + // create you models + var siteModel = SPMeta2Model.NewSiteModel(site => + { + + }); + + var webModel = SPMeta2Model.NewWebModel(web => + { + + }); + + // setup client context + using (var clientContext = new ClientContext(siteUrl)) + { + var provisionService = new StandardCSOMProvisionService(); + + // setup incremental provision settings + var incrementalProvisionConfig = new IncrementalProvisionConfig(); + + // 1 - store model hash in SharePoint + incrementalProvisionConfig.AutoDetectSharePointPersistenceStorage = true; + + // 2 - set incremental provisio model for the provision service + provisionService.SetIncrementalProvisionMode(incrementalProvisionConfig); + + // set model id for incremental provision + siteModel.SetIncrementalProvisionModelId(incrementalModelId); + webModel.SetIncrementalProvisionModelId(incrementalModelId); + + + // deploy incrementally + provisionService.DeploySiteModel(clientContext, siteModel); + provisionService.DeployWebModel(clientContext, webModel); + + // revert back to normal provision mode + provisionService.SetDefaultProvisionMode(); + } + } + + #endregion + + #endregion + } +} \ No newline at end of file diff --git a/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/ProvisionServices.md b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/ProvisionServices.md index 455321646..5d891ece4 100644 --- a/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/ProvisionServices.md +++ b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/ProvisionServices.md @@ -1,6 +1,77 @@ ----- +--- Title: Provision services ----- -TODO +FileName: provisionservices.html +--- +### SPMeta2 Provision Services -https://github.com/SubPointSolutions/spmeta2-docs/issues/85 \ No newline at end of file +Provision services is the last concept you need to know about SPMeta2. + +Before you begin, make sure you are familiar with the following concepts: + +* [Definitions concept](/spmeta2/reference/definitions) +* [Models concept](/spmeta2/reference/models) + +Once you get your definitions and model, so-called "provision services" make all the heavy lifting to get model deployed to SharePoint. +SPMeta2 provides several provision services aiming to support CSOM and SSOM APIs as well as SharePoint Foundation and SharePoint Standard editions. + +### Default provision services +All versions of SPMeta2 comes with the following provision services: + +#### CSOM based provision: +* CSOMProvisionService +* StandardCSOMProvisionService + +#### SSOM based provision: +* SSOMProvisionService +* StandardSSOMProvisionService + +CSOM and SSOM corresponds to the API which would be used for provisioning. +Normally, you should use either StandardCSOMProvisionService or StandardCSOMProvisionService provision services unless you use SharePoint foundation - that's there you better stay on CSOMProvisionService or SSOMProvisionService. + +Such separation and seevral provision services helpds to avoid assembly referencies to a particular API (CSOM/SSOM) and dependency on a particular SharePoint edition. +We still can develop with SharePoint Standard using StandardXXXProvisionService or downgrade to SharePoint Foundation, more of a legacy scenario, using CSOMProvisionService or SSOMProvisionService. + +While adding referencies to SPMeta2 in your project use the following NuGet pckages: +#### SharePoint 2010 CSOM +* SPMeta2.CSOM.Foundation-v14 (CSOMProvisionService) +* SPMeta2.CSOM.Standard-v14 (StandardCSOMProvisionService) + +#### SharePoint 2010 SSOM +* SPMeta2.SSOM.Foundation-v14 (SSOMProvisionService) +* SPMeta2.SSOM.Standard-v14 (StandardSSOMProvisionService) + +#### SharePoint 2013 CSOM / SharePoint Online: +* SPMeta2.CSOM.Foundation (CSOMProvisionService) +* SPMeta2.CSOM.Standard (StandardCSOMProvisionService) + +#### SharePoint 2013 SSOM +* SPMeta2.SSOM.Foundation (CSOMProvisionService) +* SPMeta2.SSOM.Standard (StandardCSOMProvisionService) + +#### SharePoint Online: +* SPMeta2.CSOM.Foundation-v16 (CSOMProvisionService) +* SPMeta2.CSOM.Standard-v16 (StandardCSOMProvisionService) + +Once you add correct referencies, it is really easy to get your model deployed to SharePoint. +Use the following snippets or check [Writing a simple console app](/spmeta2/getting-started/writing-console-app.html) example. + + +#### CSOM provision, site models + + +#### CSOM provision, web models + + +#### SSOM provision, site models + + +#### SSOM provision, web models + + +SSOM provision has more capabilitied over CSOM, so additional methods such as DeployFarmModel(..) and DeployWebApplicationModel(..) enable farm level and web application level provision. + +#### SSOM provision, farm models + + +#### SSOM provision, web application models + \ No newline at end of file diff --git a/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-foundation-definitions/ContentTypeLinkDefinition.md b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-foundation-definitions/ContentTypeLinkDefinition.md index 5ace83bf4..0b8faa80d 100644 --- a/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-foundation-definitions/ContentTypeLinkDefinition.md +++ b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-foundation-definitions/ContentTypeLinkDefinition.md @@ -1,23 +1,6 @@ ----- -Hidden: true ----- +Adding content types to a list is enabled via a ContentTypeLinkDefinition object. -### Provision scenario -SCENARIO - -### Scope -SCOPE - -### Implementation -IMPLEMENTATION - -### Samples -A SAMPLE 1 -[TEST.TestFunctionName1] - -A SAMPLE 2 -[TEST.TestFunctionName2] - -### Links -- [link 1](http://example.com) -- [link 2](http://example.com) \ No newline at end of file +Both CSOM/SSOM object models are supported. +Provision checks if a content type exists in a particular list by Name. +If a content type cannot be found by Name, provision tries to find a list content type by comparing its parent content type Id. +You can deploy either a single content type link or a set using AddContentTypeLinks() extension method as per following examples. \ No newline at end of file diff --git a/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-foundation-definitions/ContentTypeLinkDefinitionTests.cs b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-foundation-definitions/ContentTypeLinkDefinitionTests.cs index 1be9ef6e3..5204abe44 100644 --- a/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-foundation-definitions/ContentTypeLinkDefinitionTests.cs +++ b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-foundation-definitions/ContentTypeLinkDefinitionTests.cs @@ -1,9 +1,12 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; +using SPMeta2.Definitions; using SPMeta2.Docs.ProvisionSamples.Base; using SPMeta2.Docs.ProvisionSamples.Definitions; +using SPMeta2.Enumerations; using SPMeta2.Syntax.Default; using SubPointSolutions.Docs.Code.Enumerations; using SubPointSolutions.Docs.Code.Metadata; +using System; namespace SPMeta2.Docs.ProvisionSamples.Provision.Definitions { @@ -13,7 +16,7 @@ namespace SPMeta2.Docs.ProvisionSamples.Provision.Definitions [SampleMetadataTag(Name = BuiltInTagNames.SampleCategory, Value = BuiltInSampleCategoryTagValues.ContentTypes)] [SampleMetadataTag(Name = BuiltInTagNames.SampleM2Model, Value = BuiltInM2ModelTagValues.WebModel)] - [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)] + //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)] public class ContentTypeLinkDefinitionTests : ProvisionTestBase { #region methods @@ -21,15 +24,73 @@ public class ContentTypeLinkDefinitionTests : ProvisionTestBase [TestMethod] [TestCategory("Docs.ContentTypeLinkDefinition")] - [SampleMetadata(Title = "Add content type to lists", + [SampleMetadata(Title = "Add content type to list", Description = "" )] - [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)] - public void CanDeploySimpleContentTypeLinkDefinition() + //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)] + public void CanDeployListItemContentTypeLinkDefinition() { - var model = SPMeta2Model.NewSiteModel(site => + var customerInfoContentType = new ContentTypeDefinition { - + Name = "Customer Information", + Id = new Guid("e33acc19-6d61-43b0-a313-4177065cd7c3"), + ParentContentTypeId = BuiltInContentTypeId.Item, + Group = "SPMeta2.Samples" + }; + + var customerInfoList = new ListDefinition + { + Title = "Customer Information", + Description = "A list to store customer information.", + TemplateType = BuiltInListTemplateTypeId.GenericList, + Url = "CustomerInfo", + ContentTypesEnabled = true + }; + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddList(customerInfoList, list => + { + list.AddContentTypeLink(customerInfoContentType); + }); + }); + + DeployModel(model); + } + + + [TestMethod] + [TestCategory("Docs.ContentTypeLinkDefinition")] + + [SampleMetadata(Title = "Add content type to document library", + Description = "" + )] + //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)] + public void CanDeployDocumentItemContentTypeLinkDefinition() + { + var customerReportContentType = new ContentTypeDefinition + { + Name = "Customer Report", + Id = new Guid("1836765c-6264-479b-a95b-a553a3d14ba3"), + ParentContentTypeId = BuiltInContentTypeId.Document, + Group = "SPMeta2.Samples" + }; + + var customerInfoList = new ListDefinition + { + Title = "Customer Reports", + Description = "A list to store customer reports.", + TemplateType = BuiltInListTemplateTypeId.DocumentLibrary, + Url = "CustomerReports", + ContentTypesEnabled = true + }; + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddList(customerInfoList, list => + { + list.AddContentTypeLink(customerReportContentType); + }); }); DeployModel(model); diff --git a/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-foundation-definitions/FieldDefinition.md b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-foundation-definitions/FieldDefinition.md index bdb2f53a1..8986e3def 100644 --- a/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-foundation-definitions/FieldDefinition.md +++ b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-foundation-definitions/FieldDefinition.md @@ -1,4 +1,9 @@ -Provision checks if field exists looking up it by Id/Name property, -then creates a new site field. +Adding new field to site, web and lists is enabled via FieldDefinition object and .AddField() extension method. -We suggest to use BuiltInFieldTypes to benefit OOTB SharePoint field types. \ No newline at end of file +Provision checks if field exists trying to find existing one by Id/Name properties. +If field cannot be found, a new one is created under selected scope - site, web or list. + +It can also be suggested to use BuiltInFieldTypes to benefit OOTB SharePoint field types. + +> Be aware: while adding field directly to a list FieldDefinition.AddFieldOption should be set to "AddFieldInternalNameHint" so that field would get the right internal name within a list. +By default SharePoint would generate InternalName for a list scoped fields. \ No newline at end of file diff --git a/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-standard-definitions/PageLayoutAndSiteTemplateSettingsDefinition.md b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-standard-definitions/PageLayoutAndSiteTemplateSettingsDefinition.md index c59113c24..fb704f669 100644 --- a/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-standard-definitions/PageLayoutAndSiteTemplateSettingsDefinition.md +++ b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-standard-definitions/PageLayoutAndSiteTemplateSettingsDefinition.md @@ -1,22 +1,8 @@ ----- -Hidden: true ----- -### Provision scenario -SCENARIO +Page Layout and Site Template Settings setup is enabled via a PageLayoutAndSiteTemplateSettingsDefinition object. -### Scope -SCOPE +Provision always overrided all values as per PageLayoutAndSiteTemplateSettingsDefinition setup for a target web site. +PageLayoutAndSiteTemplateSettingsDefinition object tends to map all available options from the SharePoint UI including template and page inheritance, page layout settings and the rest. -### Implementation -IMPLEMENTATION +Be aware that publishing features have to be enabled on both target web and site collection prior web templates and layouts setup. +Refer to the examples below to boht activate features and setup page layouts and web templates as you need. -###Samples -A SAMPLE 1 -[TEST.TestFunctionName1] - -A SAMPLE 2 -[TEST.TestFunctionName2] - -### Links -- [link 1](http://example.com) -- [link 2](http://example.com) \ No newline at end of file diff --git a/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-standard-definitions/PageLayoutAndSiteTemplateSettingsDefinitionTests.cs b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-standard-definitions/PageLayoutAndSiteTemplateSettingsDefinitionTests.cs index 0b182b8ee..87961e90e 100644 --- a/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-standard-definitions/PageLayoutAndSiteTemplateSettingsDefinitionTests.cs +++ b/SPMeta2/SubPointSolutions.Docs/Views/SPMeta2/reference/sp-standard-definitions/PageLayoutAndSiteTemplateSettingsDefinitionTests.cs @@ -1,9 +1,14 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using SPMeta2.Docs.ProvisionSamples.Base; using SPMeta2.Docs.ProvisionSamples.Definitions; +using SPMeta2.Enumerations; +using SPMeta2.Standard.Definitions; +using SPMeta2.Standard.Enumerations; using SPMeta2.Syntax.Default; +using SPMeta2.Standard.Syntax; using SubPointSolutions.Docs.Code.Enumerations; using SubPointSolutions.Docs.Code.Metadata; +using System.Collections.ObjectModel; namespace SPMeta2.Docs.ProvisionSamples.Provision.Definitions { @@ -21,18 +26,63 @@ public class PageLayoutAndSiteTemplateSettingsDefinitionTests : ProvisionTestBas [TestMethod] [TestCategory("Docs.PageLayoutAndSiteTemplateSettingsDefinition")] - [SampleMetadata(Title = "Add page layout and site template settings", + [SampleMetadata(Title = "Setup default web templates", Description = "" )] - [SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)] + //[SampleMetadataTag(Name = BuiltInTagNames.SampleHidden)] public void CanDeploySimplePageLayoutAndSiteTemplateSettingsDefinition() { - var model = SPMeta2Model.NewSiteModel(site => + var sitePublishingInfrastructureFeature = BuiltInSiteFeatures.SharePointServerPublishingInfrastructure.Inherit(def => { - + def.Enable(); }); - DeployModel(model); + var webPublishingInfrastructureFeature = BuiltInWebFeatures.SharePointServerPublishing.Inherit(def => + { + def.Enable(); + }); + + var settings = new PageLayoutAndSiteTemplateSettingsDefinition + { + // setup web templates + UseDefinedWebTemplates = true, + DefinedWebTemplates = new Collection + { + BuiltInWebTemplates.Collaboration.BlankSite, + BuiltInWebTemplates.Collaboration.Blog, + BuiltInWebTemplates.Collaboration.TeamSite + }, + + // setup page layouts + UseDefinedPageLayouts = true, + DefinedPageLayouts = new Collection + { + BuiltInPublishingPageLayoutNames.ArticleLeft, + BuiltInPublishingPageLayoutNames.ArticleRight, + BuiltInPublishingPageLayoutNames.ArticleLinks + }, + + // setup default page layout + UseDefinedDefaultPageLayout = true, + DefinedDefaultPageLayout = BuiltInPublishingPageLayoutNames.ArticleRight, + }; + + // create site model to enable publishing infrastructure + // then deploy web model with page layout settings + + var siteModel = SPMeta2Model.NewSiteModel(site => + { + site.AddSiteFeature(sitePublishingInfrastructureFeature); + }); + + var webModel = SPMeta2Model.NewWebModel(web => + { + web.AddWebFeature(webPublishingInfrastructureFeature); + web.AddPageLayoutAndSiteTemplateSettings(settings); + }); + + DeployModel(siteModel); + DeployModel(webModel); } #endregion