From 60f666951839e3bf642e21cae6f92656412d6004 Mon Sep 17 00:00:00 2001 From: "support@subpointsolutions.com" Date: Mon, 8 Aug 2016 02:52:13 -0700 Subject: [PATCH 01/12] + Add 'Html Master Page' provision support #340 + SSOM implementation and tests --- ...DefaultHtmlMasterPageTemplates.Designer.cs | 74 ++++ .../DefaultHtmlMasterPageTemplates.resx | 321 ++++++++++++++++++ .../HtmlMasterPageDefinitionGenerator.cs | 55 +++ .../SPMeta2.Containers.csproj | 10 + .../SPMeta2.Regression.SSOM.csproj | 1 + .../HtmlMasterPageDefinitionValidator.cs | 208 ++++++++++++ .../Impl/Random/RandomDefinitionTest.cs | 8 +- .../Base/MasterPageModelHandlerBase.cs | 135 ++++++++ .../HtmlMasterPageModelHandler.cs | 54 +++ .../ModelHandlers/MasterPageModelHandler.cs | 196 +++-------- SPMeta2/SPMeta2.SSOM/SPMeta2.SSOM.csproj | 15 +- .../Base/MasterPageDefinitionBase.cs | 69 ++++ .../Definitions/HtmlMasterPageDefinition.cs | 52 +++ .../Definitions/MasterPageDefinition.cs | 136 +++----- SPMeta2/SPMeta2/SPMeta2.csproj | 3 + .../Default/HtmlMasterPageDefinitionSyntax.cs | 48 +++ 16 files changed, 1149 insertions(+), 236 deletions(-) create mode 100644 SPMeta2/SPMeta2.Containers/DefaultHtmlMasterPageTemplates.Designer.cs create mode 100644 SPMeta2/SPMeta2.Containers/DefaultHtmlMasterPageTemplates.resx create mode 100644 SPMeta2/SPMeta2.Containers/DefinitionGenerators/HtmlMasterPageDefinitionGenerator.cs create mode 100644 SPMeta2/SPMeta2.Regression.SSOM/Validation/HtmlMasterPageDefinitionValidator.cs create mode 100644 SPMeta2/SPMeta2.SSOM/ModelHandlers/Base/MasterPageModelHandlerBase.cs create mode 100644 SPMeta2/SPMeta2.SSOM/ModelHandlers/HtmlMasterPageModelHandler.cs create mode 100644 SPMeta2/SPMeta2/Definitions/Base/MasterPageDefinitionBase.cs create mode 100644 SPMeta2/SPMeta2/Definitions/HtmlMasterPageDefinition.cs create mode 100644 SPMeta2/SPMeta2/Syntax/Default/HtmlMasterPageDefinitionSyntax.cs diff --git a/SPMeta2/SPMeta2.Containers/DefaultHtmlMasterPageTemplates.Designer.cs b/SPMeta2/SPMeta2.Containers/DefaultHtmlMasterPageTemplates.Designer.cs new file mode 100644 index 000000000..36043e6ec --- /dev/null +++ b/SPMeta2/SPMeta2.Containers/DefaultHtmlMasterPageTemplates.Designer.cs @@ -0,0 +1,74 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SPMeta2.Containers { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class DefaultHtmlMasterPageTemplates { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal DefaultHtmlMasterPageTemplates() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SPMeta2.Containers.DefaultHtmlMasterPageTemplates", typeof(DefaultHtmlMasterPageTemplates).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?><!--SPG: + ///This HTML file has been associated with a SharePoint Master Page (.master file) carrying the same name. While the files remain associated, you will not be allowed to edit the .master file, and any rename, move, or deletion operations will be reciprocated. + ///To build the master page directly from this HTML file, simply edit the page as you normally would. Use the Snippet Generator at http://sp2013/_layouts/15/ComponentHome.aspx?Url=http%3A%2F%2Fsp15%2F%5Fcatal [rest of string was truncated]";. + /// + internal static string DesignManagerStarter { + get { + return ResourceManager.GetString("DesignManagerStarter", resourceCulture); + } + } + } +} diff --git a/SPMeta2/SPMeta2.Containers/DefaultHtmlMasterPageTemplates.resx b/SPMeta2/SPMeta2.Containers/DefaultHtmlMasterPageTemplates.resx new file mode 100644 index 000000000..8ad0a72c9 --- /dev/null +++ b/SPMeta2/SPMeta2.Containers/DefaultHtmlMasterPageTemplates.resx @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + <?xml version="1.0" encoding="utf-8"?><!--SPG: +This HTML file has been associated with a SharePoint Master Page (.master file) carrying the same name. While the files remain associated, you will not be allowed to edit the .master file, and any rename, move, or deletion operations will be reciprocated. +To build the master page directly from this HTML file, simply edit the page as you normally would. Use the Snippet Generator at http://sp2013/_layouts/15/ComponentHome.aspx?Url=http%3A%2F%2Fsp15%2F%5Fcatalogs%2Fmasterpage%2FStarterBranding%2FStarter%20DesignManager%2Emaster to create and customize useful SharePoint entities, then copy and paste them as HTML snippets into your HTML code. All updates to this file will automatically sync to the associated Master Page. +--> +<!-- ==================================================================================================== --> +<!-- STARTER INSTRUCTIONS: Be sure to replace "http://sp2013" with whatever your SharePoint server is named --> +<!-- ==================================================================================================== --> +<!DOCTYPE HTML[]> +<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"> + <head> + <!--SID:00 --> + <meta http-equiv="X-UA-Compatible" content="IE=10" /> + <meta charset="utf-8" /> + <meta name="GENERATOR" content="Microsoft SharePoint" /> + <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> + <meta http-equiv="Expires" content="0" /> + + <!-- ===== STARTER: Robots =========================================================================================== --> + <!--SPM:<SharePoint:RobotsMetaTag runat="server"/>--> + + <!-- ===== STARTER: Favicon / Windows Tile ======================================================================================== --> + <!--MS:<SharePoint:SPShortcutIcon runat="server" IconUrl="/_catalogs/masterpage/StarterBranding/favicon.ico"/>--> + <!--MS:<SharePoint:SPPinnedSiteTile runat="server" TileUrl="/_catalogs/masterpage/StarterBranding/metrotile.png" TileColor="#0072C6" />--> + + <!-- ===== STARTER: Page Title loaded from page or page layout =========================================================================================== --> + <!--MS:<SharePoint:PageTitle runat="server">--> + <!--SPM:<asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server">--> + <!--SPM:<SharePoint:ProjectProperty Property="Title" runat="server"/>--> + <!--SPM:</asp:ContentPlaceHolder>--> + <!--ME:</SharePoint:PageTitle>--> + + <!-- ===== STARTER: SP Scripts and CSS =========================================================================================== --> + <!--SPM:<SharePoint:StartScript runat="server"/>--> + <!--MS:<SharePoint:CssLink runat="server" Version="15">--> + <!--PS: Start Preview--><link href="http://sp2013/_layouts/15/1033/styles/Themable/corev15.css" rel="stylesheet" type="text/css" /><link href="http://sp2013/_layouts/15/1033/styles/OLD/Themable/layouts.css" rel="stylesheet" type="text/css" /><link href="http://sp2013/_layouts/15/1033/styles/Themable/searchv15.css" rel="stylesheet" type="text/css" /><!--PE: End Preview--> + <!--ME:</SharePoint:CssLink>--> + <!--SPM:<SharePoint:CacheManifestLink runat="server"/>--> + <!--SPM:<SharePoint:PageRenderMode runat="server" RenderModeType="Standard"/>--> + <!--SPM:<SharePoint:ScriptLink language="javascript" name="core.js" OnDemand="true" runat="server" Localizable="false"/>--> + <!--SPM:<SharePoint:ScriptLink language="javascript" name="menu.js" OnDemand="true" runat="server" Localizable="false"/>--> + <!--SPM:<SharePoint:ScriptLink language="javascript" name="callout.js" OnDemand="true" runat="server" Localizable="false"/>--> + <!--SPM:<SharePoint:ScriptLink language="javascript" name="sharing.js" OnDemand="true" runat="server" Localizable="false"/>--> + <!--SPM:<SharePoint:ScriptLink language="javascript" name="suitelinks.js" OnDemand="true" runat="server" Localizable="false"/>--> + <!--SPM:<SharePoint:CustomJSUrl runat="server"/>--> + <!--MS:<SharePoint:SoapDiscoveryLink runat="server">--> + <!--PS: Start Preview--><link href="http://sp2013/_vti_bin/spsdisco.aspx" rel="alternate" type="text/xml" /><!--PE: End Preview--> + <!--ME:</SharePoint:SoapDiscoveryLink>--> + + <!-- ===== STARTER: Additional header placeholder - overridden by asp:content on pages or page layouts =========================== --> + <!--SPM:<asp:ContentPlaceHolder ID="PlaceHolderAdditionalPageHead" runat="server"/>--> + <!--SPM:<SharePoint:DelegateControl runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true"/>--> + + <!-- ===== STARTER: Core SharePoint CSS =========================================================================================== --> + <!--SPM:<SharePoint:CssRegistration Name="Themable/corev15.css" runat="server"/>--> + + <!-- ===== STARTER: Custom CSS =========================================================================================== --> + <link type="text/css" media="all" href="style.css" rel="Stylesheet" /> + + <!--CS: ===== STARTER: Tells SharePoint this HTML is converted to Master =========================================================================================== --><!--CE: --> + <!--[if gte mso 9]><xml> + <mso:CustomDocumentProperties> + <mso:ContentTypeId msdt:dt="string">0x0101000F1C8B9E0EB4BE489F09807B2C53288F0054AD6EF48B9F7B45A142F8173F171BD10003D357F861E29844953D5CAA1D4D8A3A</mso:ContentTypeId> + <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated> + <mso:HtmlDesignFromMaster msdt:dt="string">http://sp2013/_catalogs/masterpage/StarterBranding/Starter DesignManager.html, http://sp2013/_catalogs/masterpage/StarterBranding/Starter DesignManager.html</mso:HtmlDesignFromMaster> + <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded> + <mso:HtmlDesignStatusAndPreview msdt:dt="string">http://sp2013/_catalogs/masterpage/StarterBranding/Starter DesignManager.html, Conversion successful.</mso:HtmlDesignStatusAndPreview> + <mso:ContentType msdt:dt="string">Design File</mso:ContentType> + </mso:CustomDocumentProperties> + </xml><![endif]--> + </head> + + <!-- ===== STARTER: SP IDs / Prefetch SP images / SP Form injected after BODY tag =========================================================================================== --> + <body> + <!-- ===== STARTER: Ribbon Code Starts Here =========================================================================================== --> + <!--SID:02 {Ribbon Snippet}--> + <!--PS: Start Preview--><div class="DefaultContentBlock" style="background:rgb(0, 114, 198); color:white; width:100%; padding:8px; height:64px; overflow:hidden;">In true previews of your site, the SharePoint ribbon will be here.</div><!--PE: End Preview--> + <!-- ===== STARTER: Ribbon Code Ends Here =========================================================================================== --> + + <!-- ===== STARTER: Authentication / Login link hidden for everyone by anonymous users =========================================================================================== --> + <!--SPM:<%@Register Tagprefix="wssucw" TagName="Welcome" Src="~/_controltemplates/15/Welcome.ascx"%>--> + <!--MS:<SharePoint:SPSecurityTrimmedControl runat="server" AuthenticationRestrictions="AnonymousUsersOnly">--> + <!--MS:<wssucw:Welcome runat="server" EnableViewState="false">--> + <!--PS: Start of READ-ONLY PREVIEW (do not modify)--><span style="display:none"><menu type="ServerMenu" id="zz1_ID_PersonalActionMenu" hideicons="true"><menuitem id="zz2_ID_PersonalInformation" type="option" iconSrc="/_layouts/15/images/menuprofile.gif?rev=23" onMenuClick="javascript:GoToPage('\u002f_layouts\u002f15\u002fuserdisp.aspx?Force=True');return false;" description="Update your user information, language and regional settings, and alerts." menuGroupId="100"></menuitem><menuitem id="zz3_ID_Logout" type="option" onMenuClick="STSNavigate2(event,'/_layouts/15/SignOut.aspx');" menuGroupId="100"></menuitem></menu></span><span id="zz4_Menu_t" class="ms-menu-althov ms-welcome-root" title="Open Menu" onmouseover="MMU_PopMenuIfShowing(this);MMU_EcbTableMouseOverOut(this, true)" hoveractive="ms-menu-althov-active ms-welcome-root ms-welcome-hover" hoverinactive="ms-menu-althov ms-welcome-root" onclick=" CoreInvoke('MMU_Open',byid(''), MMU_GetMenuFromClientId('zz4_Menu'),event,true, null, 0); return false;" foa="MMU_GetMenuFromClientId('zz4_Menu')" oncontextmenu="ClkElmt(this); return false;" style="white-space:nowrap"><a class="ms-core-menu-root" id="zz4_Menu" accesskey="/" href="javascript:;" title="Open Menu" onfocus="MMU_EcbLinkOnFocusBlur(byid(''), this, true);" onkeydown="MMU_EcbLinkOnKeyDown(byid(''), MMU_GetMenuFromClientId('zz4_Menu'), event);" onclick=" CoreInvoke('MMU_Open',byid(''), MMU_GetMenuFromClientId('zz4_Menu'),event,true, null, 0); return false;" oncontextmenu="ClkElmt(this); return false;" menutokenvalues="MENUCLIENTID=zz4_Menu,TEMPLATECLIENTID=zz1_ID_PersonalActionMenu" serverclientid="zz4_Menu">System Account<span class="ms-accessible">Use SHIFT+ENTER to open the menu (new window).</span></a><span style="height:4px;width:7px;position:relative;display:inline-block;overflow:hidden;" class="s4-clust ms-viewselector-arrow ms-menu-stdarw ms-core-menu-arrow"><img src="http://sp2013/_layouts/15/images/spcommon.png?rev=23" alt="Open Menu" style="position:absolute;left:-95px !important;top:-259px !important;" /></span><span style="height:4px;width:7px;position:relative;display:inline-block;overflow:hidden;" class="s4-clust ms-core-menu-arrow ms-viewselector-arrow ms-menu-hovarw"><img src="http://sp2013/_layouts/15/images/spcommon.png?rev=23" alt="Open Menu" style="position:absolute;left:-86px !important;top:-259px !important;" /></span></span><a id="ctl00_ExplicitLogin" Href="_controltemplates/15/http://sp2013/_layouts/15/Authenticate.aspx" style="display:none">Sign In</a><!--PE: End of READ-ONLY PREVIEW--> + <!--ME:</wssucw:Welcome>--> + <!--ME:</SharePoint:SPSecurityTrimmedControl>--> + + <!-- ===== STARTER: SharePoint Reqs this for adding columns ===================================================== --> + <script type="text/javascript"> var submitHook = function () { return false; }; theForm._spOldSubmit = theForm.submit; theForm.submit = function () { if (!submitHook()) { this._spOldSubmit(); } }; </script> + + <!-- ===== STARTER: Web Part Manager ============================================================================================= --> + <!--SPM:<WebPartPages:SPWebPartManager runat="server"/>--> + + <!-- ===== STARTER: Main Scrolling Body Starts Here =========================================================================================== --> + <div id="s4-workspace"> + <div id="s4-bodyContainer"> + <!-- ===== STARTER: style.css adds width and margin =========================================================================================== --> + <div class="customWidth"> + + <!-- ===== STARTER: SharePoint looks for this div ID s4-titlerow for the "Focus on Content" Button ======================== --> + <div id="s4-titlerow"> + + <!-- ===== STARTER: Site Logo with link to root ======================================================================= --> + <div class="ms-dialogHidden"> + <!--MS:<SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/">--> + <!--MS:<SharePoint:SiteLogoImage ID="x63829de2201a4365a3904788f682d0a3" LogoImageUrl="/_catalogs/masterpage/StarterBranding/logo.png" AlternateText="Back to Home" runat="server">--> + <!--PS: Start of READ-ONLY PREVIEW (do not modify)--><img id="ctl00_xbd7f64f0c043400890fd4017e8befe51" class="ms-siteicon-img" name="onetidHeadbnnr0" Src="http://sp2013/_layouts/15/images/siteIcon.png?rev=23" alt="Home" /><!--PE: End of READ-ONLY PREVIEW--> + <!--ME:</SharePoint:SiteLogoImage>--> + <!--ME:</SharePoint:SPLinkButton>--> + </div> + + <!-- ===== STARTER: Global navigation =========================================================================================== --> + <div class="ms-dialogHidden"> + <!--SPM:<%@Register TagPrefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>--> + <div class="ms-displayInline ms-core-navigation ms-dialogHidden"> + <!--SPM:<PublishingNavigation:PortalSiteMapDataSource ID="topSiteMap" runat="server" EnableViewState="false" SiteMapProvider="GlobalNavigationSwitchableProvider" StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false" TrimNonCurrentTypes="Heading"/>--> + <!--MS:<SharePoint:AspMenu ID="TopNavigationMenu" runat="server" EnableViewState="false" DataSourceID="topSiteMap" AccessKey="&#60;%$Resources:wss,navigation_accesskey%&#62;" UseSimpleRendering="true" UseSeparateCss="false" Orientation="Horizontal" StaticDisplayLevels="1" AdjustForShowStartingNode="false" MaximumDynamicDisplayLevels="1" SkipLinkText="">--> + <!--PS: Start of READ-ONLY PREVIEW (do not modify)--><link rel="stylesheet" type="text/css" href="http://sp2013/_layouts/15/1033/styles/menu-21.css" /><div id="zz7_TopNavigationMenu" class=" noindex ms-core-listMenu-horizontalBox"><ul id="zz9_RootAspMenu" class="root ms-core-listMenu-root static"><li class="static"><a class="static menu-item ms-core-listMenu-item ms-displayInline ms-navedit-linkNode" tabindex="0" href="#" accesskey="1"><span class="additional-background ms-navedit-flyoutArrow"><span class="menu-item-text">Fake Item</span></span></a></li><li class="static ms-verticalAlignTop ms-listMenu-editLink ms-navedit-editArea"><span class="ms-navedit-editSpan" id="zz7_TopNavigationMenu_NavMenu_Edit"><a id="zz7_TopNavigationMenu_NavMenu_EditLinks" class="ms-navedit-editLinksText" href="#" onclick="g_QuickLaunchMenu = null; EnsureScriptParams('quicklaunch.js', 'QuickLaunchInitEditMode', 'zz7_TopNavigationMenu', 2, 0, 0, ''); cancelDefault(event); return false;"><span class="ms-displayInlineBlock"><span class="ms-navedit-editLinksIconWrapper ms-verticalAlignMiddle"><img class="ms-navedit-editLinksIcon" src="http://sp2013/_layouts/15/images/spcommon.png?rev=23" /></span><span class="ms-metadata ms-verticalAlignMiddle">Edit Links</span></span></a><span id="zz7_TopNavigationMenu_NavMenu_Loading" class="ms-navedit-menuLoading ms-hide"><a id="zz7_TopNavigationMenu_NavMenu_GearsLink" href="#" onclick="HideGears(); return false;" title="This animation indicates the operation is in progress. Click to remove this animated image."><img id="zz7_TopNavigationMenu_NavMenu_GearsImage" src="http://sp2013/_layouts/15/images/loadingcirclests16.gif?rev=23" /></a></span><div id="zz7_TopNavigationMenu_NavMenu_ErrorMsg" class="ms-navedit-errorMsg"></div></span></li></ul></div><!--PE: End of READ-ONLY PREVIEW--> + <!--ME:</SharePoint:AspMenu>--> + </div> + </div> + + <!-- ===== STARTER: Search Control ==================================================================================== --> + <div class="ms-dialogHidden"> + <!--SPM:<%@Register Tagprefix="SearchWC" Namespace="Microsoft.Office.Server.Search.WebControls" Assembly="Microsoft.Office.Server.Search, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>--> + <!--MS:<SearchWC:SearchBoxScriptWebPart UseSiteCollectionSettings="true" EmitStyleReference="false" ShowQuerySuggestions="false" ChromeType="None" UseSharedSettings="true" TryInplaceQuery="false" ServerInitialRender="true" runat="server">--> + <!--PS: Start of READ-ONLY PREVIEW (do not modify)--><div class="ms-webpart-chrome ms-webpart-chrome-fullWidth "><div WebPartID="00000000-0000-0000-0000-000000000000" HasPers="true" id="WebPart" width="100%" class="ms-WPBody noindex " OnlyForMePart="true" allowDelete="false" style=""><div componentid="ctl00_ctl03_csr" id="ctl00_ctl03_csr"><div id="SearchBox" name="Control"><div class="ms-srch-sb ms-srch-sb-border" id="ctl00_ctl03_csr_sboxdiv"><input type="text" value="Search..." maxlength="2048" accessKey="S" title="Search..." id="ctl00_ctl03_csr_sbox" autocomplete="off" autocorrect="off" onkeypress="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {if (Srch.U.isEnterKey(String.fromCharCode(event.keyCode))) {$find('ctl00_ctl03_csr').search($get('ctl00_ctl03_csr_sbox').value);return Srch.U.cancelEvent(event);}})" onkeydown="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {var ctl = $find('ctl00_ctl03_csr');ctl.activateDefaultQuerySuggestionBehavior();})" onfocus="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {var ctl = $find('ctl00_ctl03_csr');ctl.hidePrompt();ctl.setBorder(true);})" onblur="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {var ctl = $find('ctl00_ctl03_csr'); if (ctl){ ctl.showPrompt(); ctl.setBorder(false);}})" class="ms-textSmall ms-srch-sb-prompt ms-helperText" /><a title="Search" class="ms-srch-sb-searchLink" id="ctl00_ctl03_csr_SearchLink" onclick="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {$find('ctl00_ctl03_csr').search($get('ctl00_ctl03_csr_sbox').value);})" href="javascript: {}"><img src="http://sp2013/_layouts/15/images/searchresultui.png?rev=23" class="ms-srch-sb-searchImg" id="searchImg" alt="Search" /></a></div></div></div><noscript><div id="ctl00_ctl03_noscript">It looks like your browser does not have JavaScript enabled. Please turn on JavaScript and try again.</div></noscript><div id="ctl00_ctl03"></div><div class="ms-clear"></div></div></div><!--PE: End of READ-ONLY PREVIEW--> + <!--ME:</SearchWC:SearchBoxScriptWebPart>--> + </div> + + <!-- ===== STARTER: Breadcrumbs ======================================================================================= --> + <div class="ms-dialogHidden"> + <h1 id="pageTitle" class="ms-core-pageTitle"> + <!-- ===== STARTER: Needed for Adding Apps from Site Contents ======================================================================================= --> + <!--SPM:<SharePoint:AjaxDelta id="DeltaPlaceHolderPageTitleInTitleArea" runat="server">--> + <!--SPM:<asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server">--> + <!--SPM:<SharePoint:SPTitleBreadcrumb runat="server" RenderCurrentNodeAsLink="true" SiteMapProvider="SPContentMapProvider" CentralAdminSiteMapProvider="SPXmlAdminContentMapProvider">--> + <!--SPM:<PATHSEPARATORTEMPLATE>--> + <!--SPM:<SharePoint:ClusteredDirectionalSeparatorArrow runat="server"/>--> + <!--SPM:</PATHSEPARATORTEMPLATE>--> + <!--SPM:</SharePoint:SPTitleBreadcrumb>--> + <!--SPM:</asp:ContentPlaceHolder>--> + <!--SPM:</SharePoint:AjaxDelta>--> + <div class="ms-displayInlineBlock ms-normalWrap"> + <a href="javascript:;" id="ms-pageDescriptionDiv" style="display:none;"> + <span id="ms-pageDescriptionImage">&#160;</span> + </a> + <span class="ms-accessible" id="ms-pageDescription"> + <!--SPM:<asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat="server"/>--> + </span> + <!--SPM:<SharePoint:ScriptBlock runat="server">--> + <!--SPM:_spBodyOnLoadFunctionNames.push("setupPageDescriptionCallout");--> + <!--SPM:</SharePoint:ScriptBlock>--> + </div> + </h1> + </div> + </div> + + <!-- ===== STARTER: Body Area (includes left nav and body) ==================================================================== --> + <!-- ===== STARTER: Current navigation =========================================================================================== --> + <div id="sideNavBox" class="ms-dialogHidden ms-forceWrap ms-noList"> + <div class="ms-core-navigation"> + <!--SPM:<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBar" runat="server">--> + <!--SPM:<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarTop" runat="server">--> + <!-- ===== STARTER: hide the quick launch for any page the doesn't override the PlaceHolderLeftNavBar ============ --> + <!-- ===== STARTER: if you want the navigation back you can add it from the collab master ============ --> + <!--SPM:<style type="text/css">//<![CDATA[--> + <!--SPM:#contentBox { margin-left: 0; }--> + <!--SPM:#sideNavBox { display: none; }--> + <!--SPM://]]></style>--> + <!--SPM:</asp:ContentPlaceHolder>--> + <!--SPM:<asp:ContentPlaceHolder ID="PlaceHolderQuickLaunchTop" runat="server"/>--> + <!--SPM:<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarDataSource" runat="server"/>--> + <!--SPM:<asp:ContentPlaceHolder ID="PlaceHolderCalendarNavigator" runat="server"/>--> + <!--SPM:<asp:ContentPlaceHolder ID="PlaceHolderLeftActions" runat="server"/>--> + <!--SPM:<asp:ContentPlaceHolder ID="PlaceHolderQuickLaunchBottom" runat="server"/>--> + <!--SPM:</asp:ContentPlaceHolder>--> + </div> + </div> + + <!-- ===== STARTER: Main Content ========================================================================================== --> + <div id="contentBox"> + <!-- ===== STARTER: Main Placeholder gets replaced with content of the page ======================================= --> + <!--SPM:<SharePoint:AjaxDelta ID="DeltaPlaceHolderMain" IsMainContent="true" runat="server">--> + <!--SPM:<asp:ContentPlaceHolder ID="PlaceHolderMain" runat="server"/>--> + <!--SPM:</SharePoint:AjaxDelta>--> + </div> + + <div style="clear:both;" /> + <div class="ms-dialogHidden"> + &copy;Copyright 2012 StarterBranding + </div> + </div> + </div> + </div> + <!-- ===== STARTER: Main Scrolling Body Ends Here ================================================================================= --> + <!-- ===== STARTER: Form Digest, Form Close Tag, and Hidden Placeholders are all added below this =========================================================================================== --> + </body> + <!-- Created from Starter SP2013 Master Page originally by Randy Drisgill (http://blog.drisgill.com) - April 21, 2013 --> +</html> + + \ No newline at end of file diff --git a/SPMeta2/SPMeta2.Containers/DefinitionGenerators/HtmlMasterPageDefinitionGenerator.cs b/SPMeta2/SPMeta2.Containers/DefinitionGenerators/HtmlMasterPageDefinitionGenerator.cs new file mode 100644 index 000000000..28ca26e62 --- /dev/null +++ b/SPMeta2/SPMeta2.Containers/DefinitionGenerators/HtmlMasterPageDefinitionGenerator.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Text; +using SPMeta2.BuiltInDefinitions; +using SPMeta2.Containers.Services.Base; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; +using SPMeta2.Enumerations; +using SPMeta2.Models; +using SPMeta2.Syntax.Default; + +namespace SPMeta2.Containers.DefinitionGenerators +{ + public class HtmlMasterPageDefinitionGenerator : TypedDefinitionGeneratorServiceBase + { + public override DefinitionBase GenerateRandomDefinition(Action action) + { + return WithEmptyDefinition(def => + { + def.Title = Rnd.String(); + def.FileName = Rnd.String() + ".html"; + + def.Description = Rnd.String(); + + var pageIndex = Rnd.Int(2); + var pages = new[] + { + Encoding.UTF8.GetBytes(DefaultHtmlMasterPageTemplates.DesignManagerStarter) + }; + + def.Content = pages[0]; + def.NeedOverride = true; + + if (Rnd.Bool()) + def.DefaultCSSFile = string.Format("{0}.css", Rnd.String()); + }); + } + + public override ModelNode GetCustomParenHost() + { + var definition = BuiltInListDefinitions.Catalogs.MasterPage.Inherit(def => + { + + }); + + var node = new ListModelNode + { + Value = definition, + Options = { RequireSelfProcessing = false } + }; + + return node; + } + } +} diff --git a/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj b/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj index e646354e7..ead5929e6 100644 --- a/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj +++ b/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj @@ -87,6 +87,11 @@ True DefaultDwpWebpartTemplates.resx + + True + True + DefaultHtmlMasterPageTemplates.resx + True True @@ -109,6 +114,7 @@ + @@ -257,6 +263,10 @@ ResXFileCodeGenerator DefaultDwpWebpartTemplates.Designer.cs + + ResXFileCodeGenerator + DefaultHtmlMasterPageTemplates.Designer.cs + ResXFileCodeGenerator DefaultMasterPagePreviewTemplates.Designer.cs diff --git a/SPMeta2/SPMeta2.Regression.SSOM/SPMeta2.Regression.SSOM.csproj b/SPMeta2/SPMeta2.Regression.SSOM/SPMeta2.Regression.SSOM.csproj index 42a3e83c4..485866de0 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/SPMeta2.Regression.SSOM.csproj +++ b/SPMeta2/SPMeta2.Regression.SSOM/SPMeta2.Regression.SSOM.csproj @@ -145,6 +145,7 @@ + diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/HtmlMasterPageDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/HtmlMasterPageDefinitionValidator.cs new file mode 100644 index 000000000..530b45e6e --- /dev/null +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/HtmlMasterPageDefinitionValidator.cs @@ -0,0 +1,208 @@ +using Microsoft.SharePoint; +using SPMeta2.Containers.Assertion; +using SPMeta2.Definitions; +using SPMeta2.SSOM.ModelHandlers; +using SPMeta2.SSOM.ModelHosts; +using SPMeta2.Utils; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using SPMeta2.Regression.SSOM.Extensions; +using SPMeta2.Syntax.Default.Utils; + +namespace SPMeta2.Regression.SSOM.Validation +{ + public class HtmlMasterPageDefinitionValidator : HtmlMasterPageModelHandler + { + public override void DeployModel(object modelHost, DefinitionBase model) + { + var listModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + var folder = listModelHost.CurrentLibraryFolder; + + var spObject = GetCurrentObject(folder, definition); + + var assert = ServiceFactory.AssertService + .NewAssert(definition, spObject) + .ShouldNotBeNull(spObject) + .ShouldBeEqual(m => m.FileName, o => o.Name) + .ShouldBeEqual(m => m.Description, o => o.GetMasterPageDescription()) + .ShouldBeEqual(m => m.DefaultCSSFile, o => o.GetDefaultCSSFile()) + .ShouldBeEqual(m => m.Title, o => o.Title); + + // check that there is a .master page with the same name in the library + var associatedMasterPageName = definition.FileName.ToLower().EndsWith(".html") + ? definition.FileName.ToLower().Replace(".html", ".master") + : definition.FileName + ".master"; + + var associatedMasterPage = GetCurrentObjectByPageName(folder, associatedMasterPageName); + assert.ShouldNotBeNull(associatedMasterPage); + + if (definition.UIVersion.Count > 0) + { + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(def => def.UIVersion); + var dstPropValue = d.GetUIVersion(); + + var isValid = true; + + foreach (var v in s.UIVersion) + { + if (!dstPropValue.Contains(v)) + { + isValid = false; + break; + } + } + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + assert.SkipProperty(d => d.UIVersion, "UIVersion.Count is 0. Skipping"); + } + + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.Content); + //var dstProp = d.GetExpressionValue(ct => ct.GetId()); + + var isContentValid = false; + + var srcStringContent = Encoding.UTF8.GetString(s.Content); + var dstStringContent = Encoding.UTF8.GetString(d.GetContent()); + + // cannot company the content, always slightly different + //isContentValid = dstStringContent.Contains(srcStringContent); + + // length change is more realiztic check + isContentValid = dstStringContent.Length >= srcStringContent.Length; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + // Dst = dstProp, + IsValid = isContentValid + }; + }); + + if (!string.IsNullOrEmpty(definition.ContentTypeId)) + { + + } + else + { + assert.SkipProperty(m => m.ContentTypeId, "ContentTypeId is null or empty. Skipping."); + } + + if (!string.IsNullOrEmpty(definition.ContentTypeName)) + { + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(def => def.ContentTypeName); + var currentContentTypeName = d["ContentType"] as string; + + var isValis = s.ContentTypeName == currentContentTypeName; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValis + }; + }); + } + else + { + assert.SkipProperty(m => m.ContentTypeName, "ContentTypeName is null or empty. Skipping."); + } + + if (definition.DefaultValues.Any()) + { + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.DefaultValues); + + var isValid = true; + + foreach (var value in definition.DefaultValues) + { + object itemValue = null; + + if (value.FieldId.HasValue) + itemValue = spObject[value.FieldId.Value]; + else + itemValue = spObject[value.FieldName]; + + if (!Equals(itemValue, value.Value)) + { + isValid = false; + } + } + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + assert.SkipProperty(m => m.DefaultValues, "DefaultValues is empty. Skipping."); + } + + + if (definition.Values.Any()) + { + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.Values); + + var isValid = true; + + foreach (var value in definition.Values) + { + object itemValue = null; + + if (value.FieldId.HasValue) + itemValue = spObject[value.FieldId.Value]; + else + itemValue = spObject[value.FieldName]; + + if (!Equals(itemValue, value.Value)) + { + isValid = false; + } + } + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + assert.SkipProperty(m => m.Values, "Values is empty. Skipping."); + } + } + } + +} diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Random/RandomDefinitionTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Random/RandomDefinitionTest.cs index ed7547e7f..53ddc7d34 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Random/RandomDefinitionTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Random/RandomDefinitionTest.cs @@ -897,9 +897,15 @@ public void CanDeployRandom_ControlDisplayTemplateDefinition() public void CanDeployRandom_JavaScriptDisplayTemplateDefinition() { TestRandomDefinition(); + } + + [TestMethod] + [TestCategory("Regression.Rnd.MasterPageGallery")] + public void CanDeployRandom_HtmlMasterPageDefinition() + { + TestRandomDefinition(); } - [TestMethod] [TestCategory("Regression.Rnd.MasterPageGallery")] public void CanDeployRandom_MasterPageDefinition() diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/Base/MasterPageModelHandlerBase.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/Base/MasterPageModelHandlerBase.cs new file mode 100644 index 000000000..7829a6714 --- /dev/null +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/Base/MasterPageModelHandlerBase.cs @@ -0,0 +1,135 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.SharePoint; +using Microsoft.SharePoint.Utilities; +using SPMeta2.Common; +using SPMeta2.Definitions; +using SPMeta2.Enumerations; +using SPMeta2.SSOM.ModelHosts; +using SPMeta2.Utils; + +namespace SPMeta2.SSOM.ModelHandlers.Base +{ + public abstract class MasterPageModelHandlerBase : SSOMModelHandlerBase + { + #region properties + + public abstract string PageContentTypeId { get; set; } + public abstract string PageFileExtension { get; set; } + + #endregion + + #region methods + + protected virtual void DeployPage(object modelHost, SPList list, SPFolder folder, MasterPageDefinitionBase definition) + { + var web = list.ParentWeb; + var targetPage = GetCurrentObject(folder, definition); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = targetPage == null ? null : targetPage.File, + ObjectType = typeof(SPFile), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + if (targetPage == null) + targetPage = CreateObject(modelHost, folder, definition); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = targetPage.File, + ObjectType = typeof(SPFile), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + ModuleFileModelHandler.WithSafeFileOperation(list, folder, + targetPage.Url, + GetSafePageFileName(definition), + definition.Content, + definition.NeedOverride, + null, + afterFile => + { + var pageItem = afterFile.Properties; + + //pageItem[BuiltInInternalFieldNames.Title] = definition.Title; + pageItem["vti_title"] = definition.Title; + pageItem["MasterPageDescription"] = definition.Description; + pageItem[BuiltInInternalFieldNames.ContentTypeId] = PageContentTypeId; + + if (definition.UIVersion.Count > 0) + { + var value = new SPFieldMultiChoiceValue(); + + foreach (var v in definition.UIVersion) + value.Add(v); + + pageItem["UIVersion"] = value.ToString(); + } + + pageItem["DefaultCssFile"] = definition.DefaultCSSFile; + + //pageItem.Update(); + + //pageItem.SystemUpdate(); + }); + } + + private SPListItem CreateObject(object modelHost, SPFolder folder, MasterPageDefinitionBase definition) + { + var pageName = GetSafePageFileName(definition); + var fileContent = definition.Content; + + ModuleFileModelHandler.DeployModuleFile(folder, + SPUrlUtility.CombineUrl(folder.ServerRelativeUrl, pageName), + pageName, + fileContent, + true, + null, + null); + + return GetCurrentObject(folder, definition); + } + + protected string GetSafePageFileName(PageDefinitionBase pageModel) + { + var pageName = pageModel.FileName; + + if (!pageName.ToLower().EndsWith(PageFileExtension.ToLower())) + pageName += PageFileExtension.ToLower(); + + return pageName; + } + + protected SPListItem GetCurrentObject(SPFolder folder, PageDefinitionBase definition) + { + // TODO, CAML query + var pageName = GetSafePageFileName(definition); + + return GetCurrentObjectByPageName(folder, pageName); + } + + protected SPListItem GetCurrentObjectByPageName(SPFolder folder, string pageName) + { + foreach (SPFile file in folder.Files) + if (file.Name.ToUpper() == pageName.ToUpper()) + return file.Item; + + return null; + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/HtmlMasterPageModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/HtmlMasterPageModelHandler.cs new file mode 100644 index 000000000..fe704b4ed --- /dev/null +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/HtmlMasterPageModelHandler.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using Microsoft.SharePoint; +using Microsoft.SharePoint.Utilities; +using SPMeta2.Common; +using SPMeta2.Definitions; +using SPMeta2.Enumerations; +using SPMeta2.SSOM.ModelHosts; +using SPMeta2.Utils; +using SPMeta2.SSOM.ModelHandlers.Base; + +namespace SPMeta2.SSOM.ModelHandlers +{ + public class HtmlMasterPageModelHandler : MasterPageModelHandlerBase + { + #region properties + + public override Type TargetType + { + get { return typeof(HtmlMasterPageDefinition); } + } + + public override string PageContentTypeId + { + get { return BuiltInSiteContentTypeId.HtmlMasterPage; } + set { } + } + + public override string PageFileExtension + { + get { return ".html"; } + set { } + } + + #endregion + + #region methods + + public override void DeployModel(object modelHost, DefinitionBase model) + { + var listModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + + var folder = listModelHost.CurrentLibraryFolder; + var masterPageModel = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + DeployPage(modelHost, listModelHost.CurrentLibrary, folder, masterPageModel); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/MasterPageModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/MasterPageModelHandler.cs index 97c9b1eb0..1856c5ab3 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/MasterPageModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/MasterPageModelHandler.cs @@ -1,142 +1,54 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Microsoft.SharePoint; -using Microsoft.SharePoint.Utilities; -using SPMeta2.Common; -using SPMeta2.Definitions; -using SPMeta2.Enumerations; -using SPMeta2.SSOM.ModelHosts; -using SPMeta2.Utils; - -namespace SPMeta2.SSOM.ModelHandlers -{ - public class MasterPageModelHandler : SSOMModelHandlerBase - { - #region properties - - public override Type TargetType - { - get { return typeof(MasterPageDefinition); } - } - - #endregion - - #region methods - - public override void DeployModel(object modelHost, DefinitionBase model) - { - var listModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); - - var folder = listModelHost.CurrentLibraryFolder; - var masterPageModel = model.WithAssertAndCast("model", value => value.RequireNotNull()); - - DeployPage(modelHost, listModelHost.CurrentLibrary, folder, masterPageModel); - } - - private void DeployPage(object modelHost, SPList list, SPFolder folder, MasterPageDefinition definition) - { - var web = list.ParentWeb; - var targetPage = GetCurrentObject(folder, definition); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioning, - Object = targetPage == null ? null : targetPage.File, - ObjectType = typeof(SPFile), - ObjectDefinition = definition, - ModelHost = modelHost - }); - - if (targetPage == null) - targetPage = CreateObject(modelHost, folder, definition); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioned, - Object = targetPage.File, - ObjectType = typeof(SPFile), - ObjectDefinition = definition, - ModelHost = modelHost - }); - - ModuleFileModelHandler.WithSafeFileOperation(list, folder, - targetPage.Url, - GetSafePageFileName(definition), - definition.Content, - definition.NeedOverride, - null, - afterFile => - { - var pageItem = afterFile.Properties; - - //pageItem[BuiltInInternalFieldNames.Title] = definition.Title; - pageItem["vti_title"] = definition.Title; - pageItem["MasterPageDescription"] = definition.Description; - pageItem[BuiltInInternalFieldNames.ContentTypeId] = BuiltInContentTypeId.MasterPage; - - if (definition.UIVersion.Count > 0) - { - var value = new SPFieldMultiChoiceValue(); - - foreach (var v in definition.UIVersion) - value.Add(v); - - pageItem["UIVersion"] = value.ToString(); - } - - pageItem["DefaultCssFile"] = definition.DefaultCSSFile; - - //pageItem.Update(); - - //pageItem.SystemUpdate(); - }); - } - - private SPListItem CreateObject(object modelHost, SPFolder folder, MasterPageDefinition definition) - { - var pageName = GetSafePageFileName(definition); - var fileContent = definition.Content; - - ModuleFileModelHandler.DeployModuleFile(folder, - SPUrlUtility.CombineUrl(folder.ServerRelativeUrl, pageName), - pageName, - fileContent, - true, - null, - null); - - return GetCurrentObject(folder, definition); - } - - protected string GetSafePageFileName(PageDefinitionBase pageModel) - { - var pageName = pageModel.FileName; - - if (!pageName.EndsWith(".master")) - pageName += ".master"; - - return pageName; - } - - protected SPListItem GetCurrentObject(SPFolder folder, PageDefinitionBase definition) - { - // TODO, CAML query - var pageName = GetSafePageFileName(definition); - - foreach (SPFile file in folder.Files) - if (file.Name.ToUpper() == pageName.ToUpper()) - return file.Item; - - return null; - } - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using Microsoft.SharePoint; +using Microsoft.SharePoint.Utilities; +using SPMeta2.Common; +using SPMeta2.Definitions; +using SPMeta2.Enumerations; +using SPMeta2.SSOM.ModelHandlers.Base; +using SPMeta2.SSOM.ModelHosts; +using SPMeta2.Utils; + +namespace SPMeta2.SSOM.ModelHandlers +{ + public class MasterPageModelHandler : MasterPageModelHandlerBase + { + #region properties + + public override Type TargetType + { + get { return typeof(MasterPageDefinition); } + } + + public override string PageContentTypeId + { + get { return BuiltInContentTypeId.MasterPage; } + set { } + } + + public override string PageFileExtension + { + get { return ".master"; } + set { } + } + + #endregion + + #region methods + + public override void DeployModel(object modelHost, DefinitionBase model) + { + var listModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + + var folder = listModelHost.CurrentLibraryFolder; + var masterPageModel = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + DeployPage(modelHost, listModelHost.CurrentLibrary, folder, masterPageModel); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.SSOM/SPMeta2.SSOM.csproj b/SPMeta2/SPMeta2.SSOM/SPMeta2.SSOM.csproj index 4de8a5a32..2db5beaa3 100644 --- a/SPMeta2/SPMeta2.SSOM/SPMeta2.SSOM.csproj +++ b/SPMeta2/SPMeta2.SSOM/SPMeta2.SSOM.csproj @@ -31,9 +31,8 @@ 1591 true - - + bin\Debug35-$(spRuntime)\ v3.5 true @@ -45,8 +44,7 @@ false bin\Debug35-$(spRuntime)\SPMeta2.SSOM.XML - - + bin\Debug40-$(spRuntime)\ v4.0 true @@ -58,8 +56,7 @@ false bin\Debug40-$(spRuntime)\SPMeta2.SSOM.XML - - + bin\Debug45-$(spRuntime)\ v4.5 true @@ -72,8 +69,7 @@ bin\Debug45-$(spRuntime)\SPMeta2.SSOM.XML - - + bin\Debug\ v4.5 true @@ -85,7 +81,6 @@ false bin\Debug\SPMeta2.SSOM.XML - true @@ -207,6 +202,7 @@ + @@ -248,6 +244,7 @@ + diff --git a/SPMeta2/SPMeta2/Definitions/Base/MasterPageDefinitionBase.cs b/SPMeta2/SPMeta2/Definitions/Base/MasterPageDefinitionBase.cs new file mode 100644 index 000000000..1d3ea6948 --- /dev/null +++ b/SPMeta2/SPMeta2/Definitions/Base/MasterPageDefinitionBase.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using SPMeta2.Attributes.Identity; +using SPMeta2.Attributes.Regression; +using SPMeta2.Utils; + +namespace SPMeta2.Definitions +{ + /// + /// Base definition for master pages. + /// + /// + [Serializable] + [DataContract] + public abstract class MasterPageDefinitionBase : PageDefinitionBase + { + #region constructors + + protected MasterPageDefinitionBase() + { + UIVersion = new List(); + Content = new byte[0]; + NeedOverride = true; + + UIVersion.Add("15"); + } + + #endregion + + #region properties + + [ExpectValidation] + [ExpectUpdate] + [DataMember] + [ExpectNullable] + public string Description { get; set; } + + [ExpectValidation] + [ExpectUpdate] + [DataMember] + public byte[] Content { get; set; } + + [ExpectValidation] + [ExpectUpdate] + [DataMember] + [ExpectNullable] + public string DefaultCSSFile { get; set; } + + [ExpectValidation] + [ExpectUpdateAsUIVersion] + [DataMember] + public List UIVersion { get; set; } + + #endregion + + #region methods + + public override string ToString() + { + return new ToStringResult(this, base.ToString()) + .AddPropertyValue(p => p.Description) + .AddPropertyValue(p => p.DefaultCSSFile) + .ToString(); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/Definitions/HtmlMasterPageDefinition.cs b/SPMeta2/SPMeta2/Definitions/HtmlMasterPageDefinition.cs new file mode 100644 index 000000000..df4f7cf53 --- /dev/null +++ b/SPMeta2/SPMeta2/Definitions/HtmlMasterPageDefinition.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using SPMeta2.Attributes; +using SPMeta2.Attributes.Capabilities; +using SPMeta2.Attributes.Regression; +using SPMeta2.Utils; + +namespace SPMeta2.Definitions +{ + /// + /// Allows to define and deploy SharePoint asp.net master page. + /// + /// + + [SPObjectType(SPObjectModelType.SSOM, "Microsoft.SharePoint.SPFile", "Microsoft.SharePoint")] + [SPObjectType(SPObjectModelType.CSOM, "Microsoft.SharePoint.Client.File", "Microsoft.SharePoint.Client")] + + [DefaultRootHost(typeof(SiteDefinition))] + [DefaultParentHost(typeof(ListDefinition), typeof(RootWebDefinition))] + + [Serializable] + [DataContract] + [ExpectWithExtensionMethod] + [ExpectArrayExtensionMethod] + + [ParentHostCapability(typeof(ListDefinition))] + + [ExpectManyInstances] + + public class HtmlMasterPageDefinition : MasterPageDefinitionBase + { + #region constructors + + public HtmlMasterPageDefinition() + { + + } + + #endregion + + #region methods + + public override string ToString() + { + return new ToStringResult(this, base.ToString()) + .ToString(); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/Definitions/MasterPageDefinition.cs b/SPMeta2/SPMeta2/Definitions/MasterPageDefinition.cs index 5a9e82718..c995a5336 100644 --- a/SPMeta2/SPMeta2/Definitions/MasterPageDefinition.cs +++ b/SPMeta2/SPMeta2/Definitions/MasterPageDefinition.cs @@ -1,84 +1,52 @@ -using System; -using System.Collections.Generic; -using System.Runtime.Serialization; -using SPMeta2.Attributes; -using SPMeta2.Attributes.Capabilities; -using SPMeta2.Attributes.Regression; -using SPMeta2.Utils; - -namespace SPMeta2.Definitions -{ - /// - /// Allows to define and deploy SharePoint asp.net master page. - /// - /// - - [SPObjectType(SPObjectModelType.SSOM, "Microsoft.SharePoint.SPFile", "Microsoft.SharePoint")] - [SPObjectType(SPObjectModelType.CSOM, "Microsoft.SharePoint.Client.File", "Microsoft.SharePoint.Client")] - - [DefaultRootHost(typeof(SiteDefinition))] - [DefaultParentHost(typeof(ListDefinition), typeof(RootWebDefinition))] - - [Serializable] - [DataContract] - [ExpectWithExtensionMethod] - [ExpectArrayExtensionMethod] - - [ParentHostCapability(typeof(ListDefinition))] - - [ExpectManyInstances] - - public class MasterPageDefinition : PageDefinitionBase - { - #region constructors - - public MasterPageDefinition() - { - UIVersion = new List(); - Content = new byte[0]; - NeedOverride = true; - - UIVersion.Add("15"); - } - - #endregion - - #region properties - - [ExpectValidation] - [ExpectUpdate] - [DataMember] - [ExpectNullable] - public string Description { get; set; } - - [ExpectValidation] - [ExpectUpdate] - [DataMember] - public byte[] Content { get; set; } - - [ExpectValidation] - [ExpectUpdate] - [DataMember] - [ExpectNullable] - public string DefaultCSSFile { get; set; } - - [ExpectValidation] - [ExpectUpdateAsUIVersion] - [DataMember] - public List UIVersion { get; set; } - - #endregion - - #region methods - - public override string ToString() - { - return new ToStringResult(this, base.ToString()) - .AddPropertyValue(p => p.Description) - .AddPropertyValue(p => p.DefaultCSSFile) - .ToString(); - } - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using SPMeta2.Attributes; +using SPMeta2.Attributes.Capabilities; +using SPMeta2.Attributes.Regression; +using SPMeta2.Utils; + +namespace SPMeta2.Definitions +{ + /// + /// Allows to define and deploy SharePoint asp.net master page. + /// + /// + + [SPObjectType(SPObjectModelType.SSOM, "Microsoft.SharePoint.SPFile", "Microsoft.SharePoint")] + [SPObjectType(SPObjectModelType.CSOM, "Microsoft.SharePoint.Client.File", "Microsoft.SharePoint.Client")] + + [DefaultRootHost(typeof(SiteDefinition))] + [DefaultParentHost(typeof(ListDefinition), typeof(RootWebDefinition))] + + [Serializable] + [DataContract] + [ExpectWithExtensionMethod] + [ExpectArrayExtensionMethod] + + [ParentHostCapability(typeof(ListDefinition))] + + [ExpectManyInstances] + + public class MasterPageDefinition : MasterPageDefinitionBase + { + #region constructors + + public MasterPageDefinition() + { + + } + + #endregion + + #region methods + + public override string ToString() + { + return new ToStringResult(this, base.ToString()) + .ToString(); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/SPMeta2.csproj b/SPMeta2/SPMeta2/SPMeta2.csproj index 6f9c5e70d..b01874375 100644 --- a/SPMeta2/SPMeta2/SPMeta2.csproj +++ b/SPMeta2/SPMeta2/SPMeta2.csproj @@ -144,6 +144,7 @@ + @@ -155,6 +156,7 @@ + @@ -450,6 +452,7 @@ + diff --git a/SPMeta2/SPMeta2/Syntax/Default/HtmlMasterPageDefinitionSyntax.cs b/SPMeta2/SPMeta2/Syntax/Default/HtmlMasterPageDefinitionSyntax.cs new file mode 100644 index 000000000..fe4e26494 --- /dev/null +++ b/SPMeta2/SPMeta2/Syntax/Default/HtmlMasterPageDefinitionSyntax.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 HtmlMasterPageModelNode : ListItemModelNode + { + + } + + public static class HtmlMasterPageDefinitionSyntax + { + #region methods + + public static TModelNode AddHtmlMasterPage(this TModelNode model, HtmlMasterPageDefinition definition) + where TModelNode : ModelNode, IListItemHostModelNode, new() + { + return AddHtmlMasterPage(model, definition, null); + } + + public static TModelNode AddHtmlMasterPage(this TModelNode model, HtmlMasterPageDefinition definition, + Action action) + where TModelNode : ModelNode, IListItemHostModelNode, new() + { + return model.AddTypedDefinitionNode(definition, action); + } + + #endregion + + #region array overload + + public static TModelNode AddHtmlMasterPages(this TModelNode model, IEnumerable definitions) + where TModelNode : ModelNode, IListItemHostModelNode, new() + { + foreach (var definition in definitions) + model.AddDefinitionNode(definition); + + return model; + } + + #endregion + } +} From 5d7468af889abbbca98f30a250302b39716c8ccc Mon Sep 17 00:00:00 2001 From: "support@subpointsolutions.com" Date: Mon, 8 Aug 2016 03:38:42 -0700 Subject: [PATCH 02/12] + Add 'Html Master Page' provision support #340 + CSOM implementation and tests --- SPMeta2/SPMeta2.Build/m2.buildbaseline.xml | 2 +- .../Base/MasterPageModelHandlerBase.cs | 206 ++++++ .../HtmlMasterPageModelHandler.cs | 38 ++ .../ModelHandlers/MasterPageModelHandler.cs | 194 +----- SPMeta2/SPMeta2.CSOM/SPMeta2.CSOM.csproj | 7 +- .../SPMeta2.Regression.CSOM.csproj | 1 + ...ClientHtmlMasterPageDefinitionValidator.cs | 253 +++++++ .../Impl/Syntax/TypedSyntaxTests.cs | 625 +++++++++--------- 8 files changed, 833 insertions(+), 493 deletions(-) create mode 100644 SPMeta2/SPMeta2.CSOM/ModelHandlers/Base/MasterPageModelHandlerBase.cs create mode 100644 SPMeta2/SPMeta2.CSOM/ModelHandlers/HtmlMasterPageModelHandler.cs create mode 100644 SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientHtmlMasterPageDefinitionValidator.cs diff --git a/SPMeta2/SPMeta2.Build/m2.buildbaseline.xml b/SPMeta2/SPMeta2.Build/m2.buildbaseline.xml index 55d200db0..185fb1eb7 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.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.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.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.ListItemFieldValuesDefinition, 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.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.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.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.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.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.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.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.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.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.MultiChoiceFieldModelHandler, 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.ChoiceFieldModelHandler, 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.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.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.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.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.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.CSOM.Standard.ModelHandlers.SandboxSolutionModelHandler, 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.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.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.MultiChoiceFieldModelHandler, 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.ChoiceFieldModelHandler, 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.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.ListItemModelHandler, 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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.MultiChoiceFieldModelHandler, 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.ChoiceFieldModelHandler, 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.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.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.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.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.CSOM.Standard.ModelHandlers.SandboxSolutionModelHandler, 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.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.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.MultiChoiceFieldModelHandler, 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.ChoiceFieldModelHandler, 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.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.ListItemModelHandler, 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.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.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.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.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/ModelHandlers/Base/MasterPageModelHandlerBase.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Base/MasterPageModelHandlerBase.cs new file mode 100644 index 000000000..cc3bad462 --- /dev/null +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Base/MasterPageModelHandlerBase.cs @@ -0,0 +1,206 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.SharePoint.Client; +using SPMeta2.Common; +using SPMeta2.CSOM.Extensions; +using SPMeta2.CSOM.ModelHosts; +using SPMeta2.Definitions; +using SPMeta2.Enumerations; +using SPMeta2.Utils; + +namespace SPMeta2.CSOM.ModelHandlers.Base +{ + public abstract class MasterPageModelHandlerBase : CSOMModelHandlerBase + { + #region properties + + public abstract string PageContentTypeId { get; set; } + public abstract string PageFileExtension { get; set; } + + #endregion + + #region methods + protected string GetSafePageFileName(PageDefinitionBase page) + { + var fileName = page.FileName; + + if (!fileName.ToLower().EndsWith(PageFileExtension.ToLower())) + { + fileName += PageFileExtension; + } + + 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 File FindPageFile(List list, Folder folder, MasterPageDefinitionBase definition) + { + var pageName = GetSafePageFileName(definition); + return GetCurrentPage(list, folder, pageName); + } + + protected ListItem FindPage(List list, Folder folder, MasterPageDefinitionBase definition) + { + var pageName = GetSafePageFileName(definition); + + return FindPageByName(list, folder, pageName); + } + + protected ListItem FindPageByName(List list, Folder folder, string pageName) + { + 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 definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + var folder = folderModelHost.CurrentListFolder; + var list = folderModelHost.CurrentList; + + 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 => + { + var file = new FileCreationInformation(); + + file.Url = pageName; + file.Content = definition.Content; + file.Overwrite = definition.NeedOverride; + + return folder.Files.Add(file); + + }, + newFile => + { + var newFileItem = newFile.ListItemAllFields; + context.Load(newFileItem); + context.ExecuteQueryWithTrace(); + + var site = folderModelHost.HostSite; + var currentPageLayoutItem = FindPageLayoutItem(site, definition.FileName); + + + var currentPageLayoutItemContext = currentPageLayoutItem.Context; + var publishingFile = currentPageLayoutItem.File; + + currentPageLayoutItemContext.Load(currentPageLayoutItem); + currentPageLayoutItemContext.Load(currentPageLayoutItem, i => i.DisplayName); + currentPageLayoutItemContext.Load(publishingFile); + + currentPageLayoutItemContext.ExecuteQueryWithTrace(); + + newFileItem[BuiltInInternalFieldNames.Title] = definition.Title; + newFileItem["MasterPageDescription"] = definition.Description; + newFileItem[BuiltInInternalFieldNames.ContentTypeId] = PageContentTypeId; + + if (definition.UIVersion.Count > 0) + { + newFileItem["UIVersion"] = string.Join(";#", definition.UIVersion.ToArray()); + } + + newFileItem["DefaultCssFile"] = definition.DefaultCSSFile; + + 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/ModelHandlers/HtmlMasterPageModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/HtmlMasterPageModelHandler.cs new file mode 100644 index 000000000..c3753c1ff --- /dev/null +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/HtmlMasterPageModelHandler.cs @@ -0,0 +1,38 @@ +using System; +using System.Linq; +using System.Text; +using Microsoft.SharePoint.Client; +using SPMeta2.Common; +using SPMeta2.CSOM.Extensions; +using SPMeta2.CSOM.ModelHandlers.Base; +using SPMeta2.CSOM.ModelHosts; +using SPMeta2.Definitions; +using SPMeta2.Enumerations; +using SPMeta2.Utils; + +namespace SPMeta2.CSOM.ModelHandlers +{ + public class HtmlMasterPageModelHandler : MasterPageModelHandlerBase + { + #region properties + + public override Type TargetType + { + get { return typeof(HtmlMasterPageDefinition); } + } + + public override string PageContentTypeId + { + get { return BuiltInSiteContentTypeId.HtmlMasterPage; } + set { } + } + + public override string PageFileExtension + { + get { return ".html"; } + set { } + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/MasterPageModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/MasterPageModelHandler.cs index d535b2a6e..1a122d6bf 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/MasterPageModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/MasterPageModelHandler.cs @@ -4,191 +4,33 @@ using Microsoft.SharePoint.Client; using SPMeta2.Common; using SPMeta2.CSOM.Extensions; +using SPMeta2.CSOM.ModelHandlers.Base; using SPMeta2.CSOM.ModelHosts; using SPMeta2.Definitions; using SPMeta2.Enumerations; using SPMeta2.Utils; namespace SPMeta2.CSOM.ModelHandlers -{ - public class MasterPageModelHandler : CSOMModelHandlerBase +{ + public class MasterPageModelHandler : MasterPageModelHandlerBase { #region properties - public override Type TargetType - { - get { return typeof(MasterPageDefinition); } - } - - #endregion - - #region methods - protected string GetSafePageFileName(PageDefinitionBase page) - { - var fileName = page.FileName; - if (!fileName.EndsWith(".master")) fileName += ".master"; - - 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 File FindPageFile(List list, Folder folder, MasterPageDefinition definition) - { - var pageName = GetSafePageFileName(definition); - return GetCurrentPage(list, folder, pageName); - } - - protected ListItem FindPage(List list, Folder folder, MasterPageDefinition 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 definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - - var folder = folderModelHost.CurrentListFolder; - var list = folderModelHost.CurrentList; - - 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 => - { - var file = new FileCreationInformation(); - - file.Url = pageName; - file.Content = definition.Content; - file.Overwrite = definition.NeedOverride; - - return folder.Files.Add(file); - - }, - newFile => - { - var newFileItem = newFile.ListItemAllFields; - context.Load(newFileItem); - context.ExecuteQueryWithTrace(); - - var site = folderModelHost.HostSite; - var currentPageLayoutItem = FindPageLayoutItem(site, definition.FileName); - - - var currentPageLayoutItemContext = currentPageLayoutItem.Context; - var publishingFile = currentPageLayoutItem.File; - - currentPageLayoutItemContext.Load(currentPageLayoutItem); - currentPageLayoutItemContext.Load(currentPageLayoutItem, i => i.DisplayName); - currentPageLayoutItemContext.Load(publishingFile); - - currentPageLayoutItemContext.ExecuteQueryWithTrace(); - - newFileItem[BuiltInInternalFieldNames.Title] = definition.Title; - newFileItem["MasterPageDescription"] = definition.Description; - newFileItem[BuiltInInternalFieldNames.ContentTypeId] = BuiltInContentTypeId.MasterPage; - - if (definition.UIVersion.Count > 0) - { - newFileItem["UIVersion"] = string.Join(";#", definition.UIVersion.ToArray()); - } - - newFileItem["DefaultCssFile"] = definition.DefaultCSSFile; - - 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; + public override Type TargetType + { + get { return typeof(MasterPageDefinition); } + } + + public override string PageContentTypeId + { + get { return BuiltInContentTypeId.MasterPage; } + set { } + } + + public override string PageFileExtension + { + get { return ".master"; } + set { } } #endregion diff --git a/SPMeta2/SPMeta2.CSOM/SPMeta2.CSOM.csproj b/SPMeta2/SPMeta2.CSOM/SPMeta2.CSOM.csproj index 82fe36758..fd5e61067 100644 --- a/SPMeta2/SPMeta2.CSOM/SPMeta2.CSOM.csproj +++ b/SPMeta2/SPMeta2.CSOM/SPMeta2.CSOM.csproj @@ -17,7 +17,6 @@ SAK - bin\Debug35-$(spRuntime)\ @@ -31,7 +30,6 @@ false bin\Debug35-$(spRuntime)\SPMeta2.CSOM.XML - bin\Debug40-$(spRuntime)\ v4.0 @@ -44,7 +42,6 @@ false bin\Debug40-$(spRuntime)\SPMeta2.CSOM.XML - bin\Debug45-$(spRuntime)\ v4.5 @@ -58,7 +55,6 @@ bin\Debug45-$(spRuntime)\SPMeta2.CSOM.XML - bin\Debug\ v4.5 @@ -71,7 +67,6 @@ false bin\Debug\SPMeta2.CSOM.XML - true @@ -147,6 +142,7 @@ + @@ -198,6 +194,7 @@ + diff --git a/SPMeta2/SPMeta2.Regression.CSOM/SPMeta2.Regression.CSOM.csproj b/SPMeta2/SPMeta2.Regression.CSOM/SPMeta2.Regression.CSOM.csproj index ec2f48539..baa63e841 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/SPMeta2.Regression.CSOM.csproj +++ b/SPMeta2/SPMeta2.Regression.CSOM/SPMeta2.Regression.CSOM.csproj @@ -120,6 +120,7 @@ + diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientHtmlMasterPageDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientHtmlMasterPageDefinitionValidator.cs new file mode 100644 index 000000000..8882b2438 --- /dev/null +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientHtmlMasterPageDefinitionValidator.cs @@ -0,0 +1,253 @@ +using System; +using Microsoft.SharePoint.Client; +using SPMeta2.Containers.Assertion; +using SPMeta2.CSOM.ModelHandlers; +using SPMeta2.CSOM.ModelHosts; +using SPMeta2.Definitions; +using SPMeta2.Standard.Definitions; +using SPMeta2.Utils; +using System.Collections.Generic; +using System.Linq; +using SPMeta2.Syntax.Default.Utils; +using System.Text; +using SPMeta2.CSOM.Extensions; +using SPMeta2.Regression.CSOM.Extensions; + +namespace SPMeta2.Regression.CSOM.Validation +{ + public class ClientHtmlMasterPageDefinitionValidator : HtmlMasterPageModelHandler + { + #region methods + + public override void DeployModel(object modelHost, DefinitionBase model) + { + var folderModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + + var folder = folderModelHost.CurrentListFolder; + var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + var spObject = FindPage(folderModelHost.CurrentList, folder, definition); + var spFile = FindPageFile(folderModelHost.CurrentList, folder, definition); + + var context = spObject.Context; + + context.Load(spObject); + context.Load(spObject, o => o.DisplayName); + + context.Load(spFile); + context.Load(spFile, o => o.ServerRelativeUrl); + + context.ExecuteQueryWithTrace(); + + var stringCustomContentType = string.Empty; + + if (!string.IsNullOrEmpty(definition.ContentTypeName) + || !string.IsNullOrEmpty(definition.ContentTypeId)) + { + if (!string.IsNullOrEmpty(definition.ContentTypeName)) + { + stringCustomContentType = ContentTypeLookupService + .LookupContentTypeByName(folderModelHost.CurrentList, definition.ContentTypeName) + .Name; + } + } + + + var assert = ServiceFactory.AssertService + .NewAssert(definition, spObject) + .ShouldNotBeNull(spObject) + .ShouldBeEqual(m => m.FileName, o => o.GetFileName()) + .ShouldBeEqual(m => m.DefaultCSSFile, o => o.GetDefaultCSSFile()) + .ShouldBeEqual(m => m.Description, o => o.GetMasterPageDescription()) + .ShouldBeEqual(m => m.Title, o => o.GetTitle()); + + // check that there is a .master page with the same name in the library + var associatedMasterPageName = definition.FileName.ToLower().EndsWith(".html") + ? definition.FileName.ToLower().Replace(".html", ".master") + : definition.FileName + ".master"; + + var associatedMasterPage = FindPageByName(folderModelHost.CurrentList, folder, associatedMasterPageName); + assert.ShouldNotBeNull(associatedMasterPage); + + if (definition.UIVersion.Count > 0) + { + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(def => def.UIVersion); + var dstPropValue = d.GetUIVersion(); + + var isValid = true; + + foreach (var v in s.UIVersion) + { + if (!dstPropValue.Contains(v)) + { + isValid = false; + break; + } + } + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + assert.SkipProperty(d => d.UIVersion, "UIVersion.Count is 0. Skipping"); + } + + + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(m => m.Content); + //var dstProp = d.GetExpressionValue(ct => ct.GetId()); + + var isContentValid = false; + + byte[] dstContent = null; + + folderModelHost.HostClientContext.ExecuteQueryWithTrace(); + + using (var stream = File.OpenBinaryDirect(folderModelHost.HostClientContext, spFile.ServerRelativeUrl).Stream) + dstContent = ModuleFileUtils.ReadFully(stream); + + var srcStringContent = Encoding.UTF8.GetString(s.Content); + var dstStringContent = Encoding.UTF8.GetString(dstContent); + + // same or greater, length + // too tricky to compare the content + //isContentValid = dstStringContent.Contains(srcStringContent); + isContentValid = dstStringContent.Length >= srcStringContent.Length; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + // Dst = dstProp, + IsValid = isContentValid + }; + }); + + + if (!string.IsNullOrEmpty(definition.ContentTypeName)) + { + assert.ShouldBeEqual(m => m.ContentTypeName, o => o.GetContentTypeName()); + } + else + { + assert.SkipProperty(m => m.ContentTypeName, "ContentTypeName is NULL. Skipping."); + } + + if (!string.IsNullOrEmpty(definition.ContentTypeId)) + { + // TODO + } + else + { + assert.SkipProperty(m => m.ContentTypeId, "ContentTypeId is null or empty. Skipping."); + } + + if (!string.IsNullOrEmpty(definition.ContentTypeName)) + { + assert.ShouldBeEqual((p, s, d) => + { + var srcProp = s.GetExpressionValue(def => def.ContentTypeName); + var currentContentTypeName = d.ContentType.Name; + + var isValis = stringCustomContentType == currentContentTypeName; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValis + }; + }); + } + else + { + assert.SkipProperty(m => m.ContentTypeName, "ContentTypeName is null or empty. Skipping."); + } + + if (definition.DefaultValues.Count > 0) + { + assert.ShouldBeEqual((p, s, d) => + { + var isValid = true; + + foreach (var srcValue in s.DefaultValues) + { + // big TODO here for == != + + if (!string.IsNullOrEmpty(srcValue.FieldName)) + { + if (d[srcValue.FieldName].ToString() != srcValue.Value.ToString()) + isValid = false; + } + + if (!isValid) + break; + } + + var srcProp = s.GetExpressionValue(def => def.DefaultValues); + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + assert.SkipProperty(m => m.DefaultValues, "DefaultValues.Count == 0. Skipping."); + } + + if (definition.Values.Count > 0) + { + assert.ShouldBeEqual((p, s, d) => + { + var isValid = true; + + foreach (var srcValue in s.Values) + { + // big TODO here for == != + + if (!string.IsNullOrEmpty(srcValue.FieldName)) + { + if (d[srcValue.FieldName].ToString() != srcValue.Value.ToString()) + isValid = false; + } + + if (!isValid) + break; + } + + var srcProp = s.GetExpressionValue(def => def.Values); + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + assert.SkipProperty(m => m.Values, "Values.Count == 0. Skipping."); + } + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Syntax/TypedSyntaxTests.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Syntax/TypedSyntaxTests.cs index 609d53bd8..51c42ea1e 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Syntax/TypedSyntaxTests.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Syntax/TypedSyntaxTests.cs @@ -1,311 +1,314 @@ -using System; -using System.IO; -using System.Linq; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using SPMeta2.Containers; -using SPMeta2.Definitions; -using SPMeta2.Services.Impl; -using SPMeta2.Standard.Definitions.Taxonomy; -using SPMeta2.Standard.Syntax; -using SPMeta2.Syntax.Default; -using SPMeta2.Definitions.ContentTypes; -using SPMeta2.Standard.Definitions; -using SPMeta2.Syntax.Default.Utils; -using SPMeta2.Enumerations; - -namespace SPMeta2.Regression.Tests.Impl.Syntax -{ - [TestClass] - public class TypedSyntaxTests - { - - #region basic specs - - [TestMethod] - [TestCategory("Regression.Syntax")] - [TestCategory("CI.Core")] - public void CanPassTypedSyntax_FarmLevel() - { - var model = SPMeta2Model.NewFarmModel(farm => - { - farm - .AddProperty(new PropertyDefinition()) - .AddProperty(new PropertyDefinition()); - - farm.AddFeature(new FeatureDefinition()); - farm.AddFarmFeature(new FeatureDefinition()); - - farm.AddFarmSolution(new FarmSolutionDefinition()); - farm.AddManagedProperty(new ManagedPropertyDefinition()); - - farm.AddDiagnosticsServiceBase(new DiagnosticsServiceBaseDefinition()); - }); - } - - [TestMethod] - [TestCategory("Regression.Syntax")] - [TestCategory("CI.Core")] - public void CanPassTypedSyntax_WebApplicationLevel() - { - var model = SPMeta2Model.NewWebApplicationModel(webApplication => - { - webApplication - .AddProperty(new PropertyDefinition()) - .AddProperty(new PropertyDefinition()); - - webApplication.AddFeature(new FeatureDefinition()); - webApplication.AddWebApplicationFeature(new FeatureDefinition()); - - webApplication.AddAlternateUrl(new AlternateUrlDefinition()); - - webApplication.AddSite(new SiteDefinition()); - - webApplication.AddPrefix(new PrefixDefinition()); - - webApplication.AddContentDatabase(new ContentDatabaseDefinition()); - }); - } - - [TestMethod] - [TestCategory("Regression.Syntax")] - [TestCategory("CI.Core")] - public void CanPassTypedSyntax_SiteLevel() - { - var model = SPMeta2Model.NewSiteModel(site => - { - site.AddAuditSettings(new AuditSettingsDefinition()); - site.AddImageRendition(new ImageRenditionDefinition()); - - site.AddRootWeb(new RootWebDefinition()); - - site.AddEventReceiver(new EventReceiverDefinition()); - - site - .AddProperty(new PropertyDefinition()) - .AddProperty(new PropertyDefinition()); - - site.AddFeature(new FeatureDefinition()); - site.AddSiteFeature(new FeatureDefinition()); - - site.AddSecurityGroup(new SecurityGroupDefinition(), group => - { - // TODO - - // .AddSecurityRoleLink() is missed on SecurityGroup #601 - // https://github.com/SubPointSolutions/spmeta2/issues/601 - group.AddSecurityRoleLink(new SecurityRoleLinkDefinition()); - group.AddSecurityRoleLink(new SecurityRoleLinkDefinition()); - }); - - site.AddSecurityRole(new SecurityRoleDefinition()); - - site.AddWeb(new WebDefinition()); - - site.AddField(new FieldDefinition()); - site.AddContentType(new ContentTypeDefinition(), contentType => - { - contentType - .AddContentTypeFieldLink(new ContentTypeFieldLinkDefinition()) - .AddModuleFile(new ModuleFileDefinition()) - - .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition()) - .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition()) - .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition()); - }); - - site.AddSandboxSolution(new SandboxSolutionDefinition()); - - site.AddTaxonomyTermStore(new TaxonomyTermStoreDefinition(), store => - { - store.AddTaxonomyTermGroup(new TaxonomyTermGroupDefinition(), group => - { - group.AddTaxonomyTermSet(new TaxonomyTermSetDefinition(), termSet => - { - termSet.AddTaxonomyTerm(new TaxonomyTermDefinition(), term => - { - term.AddTaxonomyTerm(new TaxonomyTermDefinition()); - - // .AddTaxonomyTermLabel() is missed on TaxonomyTermDefinition #602 - // https://github.com/SubPointSolutions/spmeta2/issues/602 - term.AddTaxonomyTermLabel(new TaxonomyTermLabelDefinition()); - }); - }); - }); - }); - - site.AddRootWeb(new RootWebDefinition()); - site.AddWeb(new WebDefinition()); - - site.AddUserCustomAction(new UserCustomActionDefinition()); - }); - } - - [TestMethod] - [TestCategory("Regression.Syntax")] - [TestCategory("CI.Core")] - public void CanPassTypedSyntax_WebLevel() - { - var model = SPMeta2Model.NewWebModel(web => - { - web.AddClearRecycleBin(new ClearRecycleBinDefinition()); - - web - .AddAnonymousAccessSettings(new AnonymousAccessSettingsDefinition()) - .AddAnonymousAccessSettings(new AnonymousAccessSettingsDefinition()); - - web.AddAuditSettings(new AuditSettingsDefinition()); - web.AddWebNavigationSettings(new WebNavigationSettingsDefinition()); - web.AddPageLayoutAndSiteTemplateSettings(new PageLayoutAndSiteTemplateSettingsDefinition()); - - web.AddRootWeb(new RootWebDefinition()); - - web.AddComposedLookItemLink(new ComposedLookItemLinkDefinition()); - - web.AddTreeViewSettings(new TreeViewSettingsDefinition()); - - web.AddTopNavigationNode(new TopNavigationNodeDefinition()); - web.AddQuickLaunchNavigationNode(new QuickLaunchNavigationNodeDefinition()); - - web.AddMasterPageSettings(new MasterPageSettingsDefinition()); - web.AddRegionalSettings(new RegionalSettingsDefinition()); - - web.AddSP2013Workflow(new SP2013WorkflowDefinition()); - web.AddWelcomePage(new WelcomePageDefinition()); - - web.AddEventReceiver(new EventReceiverDefinition()); - - web - .AddProperty(new PropertyDefinition()) - .AddProperty(new PropertyDefinition()); - - web.AddFeature(new FeatureDefinition()); - web.AddWebFeature(new FeatureDefinition()); - - //web.AddSecurityGroup(new SecurityGroupDefinition()); - //web.AddSecurityRole(new SecurityRoleDefinition()); - - web.AddWeb(new WebDefinition()); - - web.AddField(new FieldDefinition()); - web.AddContentType(new ContentTypeDefinition()); - - web.AddUserCustomAction(new UserCustomActionDefinition()); - - web.AddList(new ListDefinition(), list => - { - list.AddAuditSettings(new AuditSettingsDefinition()); - - list - .AddProperty(new PropertyDefinition()) - .AddProperty(new PropertyDefinition()); - - - list.AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition()); - list.AddHideContentTypeLinks(new HideContentTypeLinksDefinition()); - list.AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition()); - - list.AddModuleFile(new ModuleFileDefinition(), moduleFile => - { - moduleFile.AddSecurityGroupLink(new SecurityGroupDefinition(), group => - { - group - .AddSecurityRoleLink(BuiltInSecurityRoleNames.Edit) - .AddSecurityRoleLink(BuiltInSecurityRoleNames.Design) - .AddSecurityRoleLink(BuiltInSecurityRoleNames.Approve); - }); - }); - - list.AddUserCustomAction(new UserCustomActionDefinition()); - - list.AddReusableHTMLItem(new ReusableHTMLItemDefinition()); - list.AddReusableTextItem(new ReusableTextItemDefinition()); - - list.AddPublishingPage(new PublishingPageDefinition()); - list.AddPublishingPageLayout(new PublishingPageLayoutDefinition()); - - list.AddComposedLookItem(new ComposedLookItemDefinition()); - - list.AddWelcomePage(new WelcomePageDefinition()); - - list.AddEventReceiver(new EventReceiverDefinition()); - - list.AddField(new FieldDefinition()); - list.AddContentTypeLink(new ContentTypeLinkDefinition()); - - list.AddListView(new ListViewDefinition(), listView => - { - // Enhance 'WebPartDefinition' provision - enabne privision under list views #590 - // https://github.com/SubPointSolutions/spmeta2/issues/590 - - listView.AddDeleteWebParts(new DeleteWebPartsDefinition()); - listView.AddWebPart(new WebPartDefinition()); - }); - - list.AddListItem(new ListItemDefinition(), listItem => - { - listItem - .AddListItemFieldValue(new ListItemFieldValueDefinition()) - .AddListItemFieldValues(new ListItemFieldValuesDefinition()); - }); - - list.AddFolder(new FolderDefinition(), folder => - { - folder - .AddProperty(new PropertyDefinition()) - .AddProperty(new PropertyDefinition()) - - .AddWelcomePage(new WelcomePageDefinition()) - .AddFolder(new FolderDefinition()) - .AddListItem(new ListItemDefinition()); - }); - - list.AddWebPartPage(new WebPartPageDefinition(), page => - { - page.AddDeleteWebParts(new DeleteWebPartsDefinition()); - page.AddWebPart(new WebPartDefinition()); - }); - - list.AddWikiPage(new WikiPageDefinition(), page => - { - page.AddDeleteWebParts(new DeleteWebPartsDefinition()); - page.AddWebPart(new WebPartDefinition()); - }); - - list.AddPublishingPage(new PublishingPageDefinition(), page => - { - page.AddDeleteWebParts(new DeleteWebPartsDefinition()); - page.AddWebPart(new WebPartDefinition()); - }); - }); - }); - } - - - [TestMethod] - [TestCategory("Regression.Syntax.Extensions")] - [TestCategory("CI.Core")] - public void CanPassTypedSyntax_Extensions() - { - var tmpDir = Path.Combine( - Path.GetTempPath(), - string.Format("m2_regression_test_CanPassTypedSyntax_Extensions_{0}", Guid.NewGuid().ToString("N"))); - - Directory.CreateDirectory(tmpDir); - - var model = SPMeta2Model.NewWebModel(web => - { - web.AddRandomList(list => - { - ModuleFileUtils.LoadModuleFilesFromLocalFolder(list, tmpDir); - - list.AddRandomFolder(folder => - { - ModuleFileUtils.LoadModuleFilesFromLocalFolder(folder, tmpDir); - }); - }); - }); - } - - #endregion - } -} +using System; +using System.IO; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using SPMeta2.Containers; +using SPMeta2.Definitions; +using SPMeta2.Services.Impl; +using SPMeta2.Standard.Definitions.Taxonomy; +using SPMeta2.Standard.Syntax; +using SPMeta2.Syntax.Default; +using SPMeta2.Definitions.ContentTypes; +using SPMeta2.Standard.Definitions; +using SPMeta2.Syntax.Default.Utils; +using SPMeta2.Enumerations; + +namespace SPMeta2.Regression.Tests.Impl.Syntax +{ + [TestClass] + public class TypedSyntaxTests + { + + #region basic specs + + [TestMethod] + [TestCategory("Regression.Syntax")] + [TestCategory("CI.Core")] + public void CanPassTypedSyntax_FarmLevel() + { + var model = SPMeta2Model.NewFarmModel(farm => + { + farm + .AddProperty(new PropertyDefinition()) + .AddProperty(new PropertyDefinition()); + + farm.AddFeature(new FeatureDefinition()); + farm.AddFarmFeature(new FeatureDefinition()); + + farm.AddFarmSolution(new FarmSolutionDefinition()); + farm.AddManagedProperty(new ManagedPropertyDefinition()); + + farm.AddDiagnosticsServiceBase(new DiagnosticsServiceBaseDefinition()); + }); + } + + [TestMethod] + [TestCategory("Regression.Syntax")] + [TestCategory("CI.Core")] + public void CanPassTypedSyntax_WebApplicationLevel() + { + var model = SPMeta2Model.NewWebApplicationModel(webApplication => + { + webApplication + .AddProperty(new PropertyDefinition()) + .AddProperty(new PropertyDefinition()); + + webApplication.AddFeature(new FeatureDefinition()); + webApplication.AddWebApplicationFeature(new FeatureDefinition()); + + webApplication.AddAlternateUrl(new AlternateUrlDefinition()); + + webApplication.AddSite(new SiteDefinition()); + + webApplication.AddPrefix(new PrefixDefinition()); + + webApplication.AddContentDatabase(new ContentDatabaseDefinition()); + }); + } + + [TestMethod] + [TestCategory("Regression.Syntax")] + [TestCategory("CI.Core")] + public void CanPassTypedSyntax_SiteLevel() + { + var model = SPMeta2Model.NewSiteModel(site => + { + site.AddAuditSettings(new AuditSettingsDefinition()); + site.AddImageRendition(new ImageRenditionDefinition()); + + site.AddRootWeb(new RootWebDefinition()); + + site.AddEventReceiver(new EventReceiverDefinition()); + + site + .AddProperty(new PropertyDefinition()) + .AddProperty(new PropertyDefinition()); + + site.AddFeature(new FeatureDefinition()); + site.AddSiteFeature(new FeatureDefinition()); + + site.AddSecurityGroup(new SecurityGroupDefinition(), group => + { + // TODO + + // .AddSecurityRoleLink() is missed on SecurityGroup #601 + // https://github.com/SubPointSolutions/spmeta2/issues/601 + group.AddSecurityRoleLink(new SecurityRoleLinkDefinition()); + group.AddSecurityRoleLink(new SecurityRoleLinkDefinition()); + }); + + site.AddSecurityRole(new SecurityRoleDefinition()); + + site.AddWeb(new WebDefinition()); + + site.AddField(new FieldDefinition()); + site.AddContentType(new ContentTypeDefinition(), contentType => + { + contentType + .AddContentTypeFieldLink(new ContentTypeFieldLinkDefinition()) + .AddModuleFile(new ModuleFileDefinition()) + + .AddUniqueContentTypeFieldsOrder(new UniqueContentTypeFieldsOrderDefinition()) + .AddHideContentTypeFieldLinks(new HideContentTypeFieldLinksDefinition()) + .AddRemoveContentTypeFieldLinks(new RemoveContentTypeFieldLinksDefinition()); + }); + + site.AddSandboxSolution(new SandboxSolutionDefinition()); + + site.AddTaxonomyTermStore(new TaxonomyTermStoreDefinition(), store => + { + store.AddTaxonomyTermGroup(new TaxonomyTermGroupDefinition(), group => + { + group.AddTaxonomyTermSet(new TaxonomyTermSetDefinition(), termSet => + { + termSet.AddTaxonomyTerm(new TaxonomyTermDefinition(), term => + { + term.AddTaxonomyTerm(new TaxonomyTermDefinition()); + + // .AddTaxonomyTermLabel() is missed on TaxonomyTermDefinition #602 + // https://github.com/SubPointSolutions/spmeta2/issues/602 + term.AddTaxonomyTermLabel(new TaxonomyTermLabelDefinition()); + }); + }); + }); + }); + + site.AddRootWeb(new RootWebDefinition()); + site.AddWeb(new WebDefinition()); + + site.AddUserCustomAction(new UserCustomActionDefinition()); + }); + } + + [TestMethod] + [TestCategory("Regression.Syntax")] + [TestCategory("CI.Core")] + public void CanPassTypedSyntax_WebLevel() + { + var model = SPMeta2Model.NewWebModel(web => + { + web.AddClearRecycleBin(new ClearRecycleBinDefinition()); + + web + .AddAnonymousAccessSettings(new AnonymousAccessSettingsDefinition()) + .AddAnonymousAccessSettings(new AnonymousAccessSettingsDefinition()); + + web.AddAuditSettings(new AuditSettingsDefinition()); + web.AddWebNavigationSettings(new WebNavigationSettingsDefinition()); + web.AddPageLayoutAndSiteTemplateSettings(new PageLayoutAndSiteTemplateSettingsDefinition()); + + web.AddRootWeb(new RootWebDefinition()); + + web.AddComposedLookItemLink(new ComposedLookItemLinkDefinition()); + + web.AddTreeViewSettings(new TreeViewSettingsDefinition()); + + web.AddTopNavigationNode(new TopNavigationNodeDefinition()); + web.AddQuickLaunchNavigationNode(new QuickLaunchNavigationNodeDefinition()); + + web.AddMasterPageSettings(new MasterPageSettingsDefinition()); + web.AddRegionalSettings(new RegionalSettingsDefinition()); + + web.AddSP2013Workflow(new SP2013WorkflowDefinition()); + web.AddWelcomePage(new WelcomePageDefinition()); + + web.AddEventReceiver(new EventReceiverDefinition()); + + web + .AddProperty(new PropertyDefinition()) + .AddProperty(new PropertyDefinition()); + + web.AddFeature(new FeatureDefinition()); + web.AddWebFeature(new FeatureDefinition()); + + //web.AddSecurityGroup(new SecurityGroupDefinition()); + //web.AddSecurityRole(new SecurityRoleDefinition()); + + web.AddWeb(new WebDefinition()); + + web.AddField(new FieldDefinition()); + web.AddContentType(new ContentTypeDefinition()); + + web.AddUserCustomAction(new UserCustomActionDefinition()); + + web.AddList(new ListDefinition(), list => + { + list.AddAuditSettings(new AuditSettingsDefinition()); + + list.AddMasterPage(new MasterPageDefinition()); + list.AddHtmlMasterPage(new HtmlMasterPageDefinition()); + + list + .AddProperty(new PropertyDefinition()) + .AddProperty(new PropertyDefinition()); + + + list.AddUniqueContentTypeOrder(new UniqueContentTypeOrderDefinition()); + list.AddHideContentTypeLinks(new HideContentTypeLinksDefinition()); + list.AddRemoveContentTypeLinks(new RemoveContentTypeLinksDefinition()); + + list.AddModuleFile(new ModuleFileDefinition(), moduleFile => + { + moduleFile.AddSecurityGroupLink(new SecurityGroupDefinition(), group => + { + group + .AddSecurityRoleLink(BuiltInSecurityRoleNames.Edit) + .AddSecurityRoleLink(BuiltInSecurityRoleNames.Design) + .AddSecurityRoleLink(BuiltInSecurityRoleNames.Approve); + }); + }); + + list.AddUserCustomAction(new UserCustomActionDefinition()); + + list.AddReusableHTMLItem(new ReusableHTMLItemDefinition()); + list.AddReusableTextItem(new ReusableTextItemDefinition()); + + list.AddPublishingPage(new PublishingPageDefinition()); + list.AddPublishingPageLayout(new PublishingPageLayoutDefinition()); + + list.AddComposedLookItem(new ComposedLookItemDefinition()); + + list.AddWelcomePage(new WelcomePageDefinition()); + + list.AddEventReceiver(new EventReceiverDefinition()); + + list.AddField(new FieldDefinition()); + list.AddContentTypeLink(new ContentTypeLinkDefinition()); + + list.AddListView(new ListViewDefinition(), listView => + { + // Enhance 'WebPartDefinition' provision - enabne privision under list views #590 + // https://github.com/SubPointSolutions/spmeta2/issues/590 + + listView.AddDeleteWebParts(new DeleteWebPartsDefinition()); + listView.AddWebPart(new WebPartDefinition()); + }); + + list.AddListItem(new ListItemDefinition(), listItem => + { + listItem + .AddListItemFieldValue(new ListItemFieldValueDefinition()) + .AddListItemFieldValues(new ListItemFieldValuesDefinition()); + }); + + list.AddFolder(new FolderDefinition(), folder => + { + folder + .AddProperty(new PropertyDefinition()) + .AddProperty(new PropertyDefinition()) + + .AddWelcomePage(new WelcomePageDefinition()) + .AddFolder(new FolderDefinition()) + .AddListItem(new ListItemDefinition()); + }); + + list.AddWebPartPage(new WebPartPageDefinition(), page => + { + page.AddDeleteWebParts(new DeleteWebPartsDefinition()); + page.AddWebPart(new WebPartDefinition()); + }); + + list.AddWikiPage(new WikiPageDefinition(), page => + { + page.AddDeleteWebParts(new DeleteWebPartsDefinition()); + page.AddWebPart(new WebPartDefinition()); + }); + + list.AddPublishingPage(new PublishingPageDefinition(), page => + { + page.AddDeleteWebParts(new DeleteWebPartsDefinition()); + page.AddWebPart(new WebPartDefinition()); + }); + }); + }); + } + + + [TestMethod] + [TestCategory("Regression.Syntax.Extensions")] + [TestCategory("CI.Core")] + public void CanPassTypedSyntax_Extensions() + { + var tmpDir = Path.Combine( + Path.GetTempPath(), + string.Format("m2_regression_test_CanPassTypedSyntax_Extensions_{0}", Guid.NewGuid().ToString("N"))); + + Directory.CreateDirectory(tmpDir); + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddRandomList(list => + { + ModuleFileUtils.LoadModuleFilesFromLocalFolder(list, tmpDir); + + list.AddRandomFolder(folder => + { + ModuleFileUtils.LoadModuleFilesFromLocalFolder(folder, tmpDir); + }); + }); + }); + } + + #endregion + } +} From f018d12fdc616c6571981ca5131f36e5c7ce6a9c Mon Sep 17 00:00:00 2001 From: "support@subpointsolutions.com" Date: Mon, 8 Aug 2016 05:18:32 -0700 Subject: [PATCH 03/12] + Consider ModelNode.ToDotGraph() method #845 + build fix for NET35 --- .../Base/MasterPageModelHandlerBase.cs | 2 +- .../Services/RegressionTestService.cs | 5 +- .../Impl/Services/ServiceContainerTests.cs | 3 +- .../Base/MasterPageModelHandlerBase.cs | 2 +- .../SPMeta2/Extensions/ModelNodeExtensions.cs | 26 ++- SPMeta2/SPMeta2/SPMeta2.csproj | 7 +- SPMeta2/SPMeta2/ServiceContainer.cs | 4 +- .../SPMeta2/Services/HashCodeServiceBase.cs | 162 ++++++++++-------- .../Impl/DefaultModelDotPrintService.cs | 126 ++++++++++++++ ...e.cs => DefaultModelPrettyPrintService.cs} | 6 +- .../Services/ModelDotPrintServiceBase.cs | 14 ++ .../Services/ModelPrettyPrintServiceBase.cs | 14 ++ ...erviceBase.cs => ModelPrintServiceBase.cs} | 5 +- 13 files changed, 286 insertions(+), 90 deletions(-) create mode 100644 SPMeta2/SPMeta2/Services/Impl/DefaultModelDotPrintService.cs rename SPMeta2/SPMeta2/Services/Impl/{DefaultPrettyPrintService.cs => DefaultModelPrettyPrintService.cs} (87%) create mode 100644 SPMeta2/SPMeta2/Services/ModelDotPrintServiceBase.cs create mode 100644 SPMeta2/SPMeta2/Services/ModelPrettyPrintServiceBase.cs rename SPMeta2/SPMeta2/Services/{PrettyPrintServiceBase.cs => ModelPrintServiceBase.cs} (60%) diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/Base/MasterPageModelHandlerBase.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Base/MasterPageModelHandlerBase.cs index cc3bad462..cdb493def 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/Base/MasterPageModelHandlerBase.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Base/MasterPageModelHandlerBase.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + using Microsoft.SharePoint.Client; using SPMeta2.Common; using SPMeta2.CSOM.Extensions; diff --git a/SPMeta2/SPMeta2.Containers/Services/RegressionTestService.cs b/SPMeta2/SPMeta2.Containers/Services/RegressionTestService.cs index 09f91dd1f..3ec108bcf 100644 --- a/SPMeta2/SPMeta2.Containers/Services/RegressionTestService.cs +++ b/SPMeta2/SPMeta2.Containers/Services/RegressionTestService.cs @@ -479,9 +479,12 @@ public void TestModels(IEnumerable models) foreach (var model in models) { - Trace.WriteLine(string.Format("PrettyPrint result:")); + Trace.WriteLine(string.Format(".ToPrettyPrint() result:")); Trace.WriteLine(model.ToPrettyPrint()); + Trace.WriteLine(string.Format(".ToDotGraph result:")); + Trace.WriteLine(model.ToDotGraph()); + if (EnableDefinitionImmutabilityValidation) PersistDefinitionHashes(new[] { model }); diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Services/ServiceContainerTests.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Services/ServiceContainerTests.cs index 1d697f15c..ed28551c9 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Services/ServiceContainerTests.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Services/ServiceContainerTests.cs @@ -37,7 +37,8 @@ public void ServiceContainer_Should_Have_DefaultServices() typeof(ModelCompatibilityServiceBase), typeof(DefaultDiagnosticInfoService), - typeof(PrettyPrintServiceBase) + typeof(ModelPrettyPrintServiceBase), + typeof(ModelDotGraphPrintServiceBase) }; foreach (var serviceType in serviceTypes) diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/Base/MasterPageModelHandlerBase.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/Base/MasterPageModelHandlerBase.cs index 7829a6714..e25eaf21d 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/Base/MasterPageModelHandlerBase.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/Base/MasterPageModelHandlerBase.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + using Microsoft.SharePoint; using Microsoft.SharePoint.Utilities; using SPMeta2.Common; diff --git a/SPMeta2/SPMeta2/Extensions/ModelNodeExtensions.cs b/SPMeta2/SPMeta2/Extensions/ModelNodeExtensions.cs index 6a0e19dd2..74b1d3c2a 100644 --- a/SPMeta2/SPMeta2/Extensions/ModelNodeExtensions.cs +++ b/SPMeta2/SPMeta2/Extensions/ModelNodeExtensions.cs @@ -185,13 +185,33 @@ internal static ModelNode CreateDefinitionNode(this ModelNode node, DefinitionBa #endregion - #region pretty print + #region print extensions + /// + /// Renders readable, tree view looking-like model view as a string + /// More details - https://github.com/SubPointSolutions/spmeta2/issues/826 + /// + /// + /// public static string ToPrettyPrint(this ModelNode modelNode) { - var prettyPrintService = ServiceContainer.Instance.GetService(); + var service = ServiceContainer.Instance.GetService(); + + return service.PrintModel(modelNode); + } + + /// + /// Generates graph in DOT notation + /// Use http://www.webgraphviz.com to visualize it fast + /// Mere details - https://github.com/SubPointSolutions/spmeta2/issues/845 + /// + /// + /// + public static string ToDotGraph(this ModelNode modelNode) + { + var service = ServiceContainer.Instance.GetService(); - return prettyPrintService.ToPrettyPrint(modelNode); + return service.PrintModel(modelNode); } #endregion diff --git a/SPMeta2/SPMeta2/SPMeta2.csproj b/SPMeta2/SPMeta2/SPMeta2.csproj index b01874375..e5c86aa91 100644 --- a/SPMeta2/SPMeta2/SPMeta2.csproj +++ b/SPMeta2/SPMeta2/SPMeta2.csproj @@ -347,7 +347,8 @@ - + + @@ -369,13 +370,15 @@ + - + + diff --git a/SPMeta2/SPMeta2/ServiceContainer.cs b/SPMeta2/SPMeta2/ServiceContainer.cs index e9902b6f1..7b85dd708 100644 --- a/SPMeta2/SPMeta2/ServiceContainer.cs +++ b/SPMeta2/SPMeta2/ServiceContainer.cs @@ -41,7 +41,9 @@ private void InitServices() RegisterService(typeof(DefaultDiagnosticInfoService), new DefaultDiagnosticInfoService()); - RegisterService(typeof(PrettyPrintServiceBase), new DefaultPrettyPrintService()); + RegisterService(typeof(ModelPrettyPrintServiceBase), new DefaultModelPrettyPrintService()); + RegisterService(typeof(ModelDotGraphPrintServiceBase), new DefaultModelDotGraphPrintService()); + } #endregion diff --git a/SPMeta2/SPMeta2/Services/HashCodeServiceBase.cs b/SPMeta2/SPMeta2/Services/HashCodeServiceBase.cs index 96faea6ec..647380d6e 100644 --- a/SPMeta2/SPMeta2/Services/HashCodeServiceBase.cs +++ b/SPMeta2/SPMeta2/Services/HashCodeServiceBase.cs @@ -1,75 +1,87 @@ -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Security.Cryptography; - -namespace SPMeta2.Services -{ - public abstract class HashCodeServiceBase : IDisposable - { - #region methods - - public abstract string GetHashCode(object instance); - - public void Dispose() - { - InternalDispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void InternalDispose(bool disposing) - { - if (disposing) - { - - } - } - - #endregion - } - - - - public class MD5HashCodeServiceBase : HashCodeServiceBase - { - #region properties - - private MD5CryptoServiceProvider _cryptoServiceProvider = new MD5CryptoServiceProvider(); - - #endregion - - #region methods - - public override string GetHashCode(object instance) - { - var serializer = new DataContractSerializer(instance.GetType()); - - using (var memoryStream = new MemoryStream()) - { - serializer.WriteObject(memoryStream, instance); - - _cryptoServiceProvider.ComputeHash(memoryStream.ToArray()); - return Convert.ToBase64String(_cryptoServiceProvider.Hash); - } - } - - protected override void InternalDispose(bool disposing) - { - base.InternalDispose(disposing); - - if (disposing) - { - if (_cryptoServiceProvider != null) - - { -#if !NET35 - // OMG - _cryptoServiceProvider.Dispose(); -#endif - } - } - } - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.Serialization; +using System.Security.Cryptography; + +namespace SPMeta2.Services +{ + public abstract class HashCodeServiceBase : IDisposable + { + #region methods + + public abstract string GetHashCode(object instance); + + public void Dispose() + { + InternalDispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void InternalDispose(bool disposing) + { + if (disposing) + { + + } + } + + #endregion + } + + + + public class MD5HashCodeServiceBase : HashCodeServiceBase + { + #region properties + + private MD5CryptoServiceProvider _cryptoServiceProvider = new MD5CryptoServiceProvider(); + + #endregion + + #region methods + + public override string GetHashCode(object instance) + { + var instanceType = instance.GetType(); + + var knowTypes = new List(); + knowTypes.Add(instanceType); + + var props = instanceType.GetProperties(); + foreach (var prop in props) + { + if (!knowTypes.Contains(prop.PropertyType)) + knowTypes.Add(prop.PropertyType); + } + + var serializer = new DataContractSerializer(instance.GetType(), knowTypes); + + using (var memoryStream = new MemoryStream()) + { + serializer.WriteObject(memoryStream, instance); + + _cryptoServiceProvider.ComputeHash(memoryStream.ToArray()); + return Convert.ToBase64String(_cryptoServiceProvider.Hash); + } + } + + protected override void InternalDispose(bool disposing) + { + base.InternalDispose(disposing); + + if (disposing) + { + if (_cryptoServiceProvider != null) + { +#if !NET35 + // OMG + _cryptoServiceProvider.Dispose(); +#endif + } + } + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/Services/Impl/DefaultModelDotPrintService.cs b/SPMeta2/SPMeta2/Services/Impl/DefaultModelDotPrintService.cs new file mode 100644 index 000000000..722c93719 --- /dev/null +++ b/SPMeta2/SPMeta2/Services/Impl/DefaultModelDotPrintService.cs @@ -0,0 +1,126 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using SPMeta2.Models; + +namespace SPMeta2.Services.Impl +{ + public class DefaultModelDotGraphPrintService : ModelDotGraphPrintServiceBase + { + #region constructora + public DefaultModelDotGraphPrintService() + { + IndentString = " "; + NewLineString = Environment.NewLine; + + HashCodeService = new MD5HashCodeServiceBase(); + + ModelNodeRelatonshipTemplate = "\"[root] {0}\" -> \"[root] {1}\""; + ModelNodeTemplate = "\"[root] {0}\" [label = \"{1}\", shape = \"box\"]"; + } + + #endregion + + #region properties + + public string NewLineString { get; set; } + public string IndentString { get; set; } + + public string ModelNodeRelatonshipTemplate { get; set; } + public string ModelNodeTemplate { get; set; } + + protected HashCodeServiceBase HashCodeService { get; set; } + + #endregion + + #region methods + + public override string PrintModel(ModelNode modelNode) + { + var result = new StringBuilder(); + + BuildGraphStart(result, modelNode); + + BuildShapes(result, modelNode); + BuildRelationships(result, modelNode); + + BuildGraphEnd(result, modelNode); + + return result.ToString(); + } + + + private void BuildGraphStart(StringBuilder result, ModelNode modelNode) + { + result.AppendFormat("digraph {{{0}", NewLineString); + + result.AppendFormat("{0}compound = \"true\"{1}", IndentString, NewLineString); + result.AppendFormat("{0}newrank = \"true\"{1}", IndentString, NewLineString); + result.AppendFormat("{0}rankdir = \"BT\"{1}", IndentString, NewLineString); + result.AppendFormat("{0}subgraph \"root\" {{{1}", IndentString, NewLineString); + } + + private void BuildGraphEnd(StringBuilder result, ModelNode modelNode) + { + result.AppendFormat("{0}}}{1}", IndentString, NewLineString); + result.AppendFormat("}}{0}", NewLineString); + } + + protected virtual void BuildRelationships(StringBuilder result, ModelNode modelNode) + { + WalkModelNodes(modelNode, result, false); + } + + protected virtual void BuildShapes(StringBuilder result, ModelNode modelNode) + { + result.AppendFormat("{0}{0}{1}{2}", IndentString, GetDefinitionShape(modelNode), NewLineString); + WalkModelNodes(modelNode, result, true); + } + + protected virtual void WalkModelNodes(ModelNode model, StringBuilder result, bool isShape) + { + foreach (var modelNodeGroup in model.ChildModels + .GroupBy(n => n.GetType()) + .OrderBy(g => g.Key.Name)) + { + foreach (var modelNode in modelNodeGroup) + { + if (isShape) + { + result.AppendFormat("{0}{0}{1}{2}", IndentString, GetDefinitionShape(modelNode), NewLineString); + } + else + { + result.AppendFormat("{0}{0}{1}{2}", IndentString, GetDefinitionRelationShip(model, modelNode), NewLineString); + } + + WalkModelNodes(modelNode, result, isShape); + } + } + } + + private string GetDefinitionRelationShip(ModelNode parentNode, ModelNode childNode) + { + var result = string.Format(ModelNodeRelatonshipTemplate, + HashCodeService.GetHashCode(childNode.Value).Replace("=", string.Empty), + HashCodeService.GetHashCode(parentNode.Value).Replace("=", string.Empty)); + + return result; + } + + protected virtual string GetDefinitionShape(ModelNode modelNode) + { + var result = modelNode.Value != null + ? string.Format(ModelNodeTemplate, + HashCodeService.GetHashCode(modelNode.Value).Replace("=", string.Empty), + string.Format("[{0}] - {1}", modelNode.Value.GetType().Name, modelNode.Value)) + : string.Empty; + + return result; + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/Services/Impl/DefaultPrettyPrintService.cs b/SPMeta2/SPMeta2/Services/Impl/DefaultModelPrettyPrintService.cs similarity index 87% rename from SPMeta2/SPMeta2/Services/Impl/DefaultPrettyPrintService.cs rename to SPMeta2/SPMeta2/Services/Impl/DefaultModelPrettyPrintService.cs index 93283dfb4..27ef768d2 100644 --- a/SPMeta2/SPMeta2/Services/Impl/DefaultPrettyPrintService.cs +++ b/SPMeta2/SPMeta2/Services/Impl/DefaultModelPrettyPrintService.cs @@ -7,10 +7,10 @@ namespace SPMeta2.Services.Impl { - public class DefaultPrettyPrintService : PrettyPrintServiceBase + public class DefaultModelPrettyPrintService : ModelPrettyPrintServiceBase { #region constructora - public DefaultPrettyPrintService() + public DefaultModelPrettyPrintService() { IndentString = " "; NewLineString = Environment.NewLine; @@ -26,7 +26,7 @@ public DefaultPrettyPrintService() #endregion #region methods - public override string ToPrettyPrint(ModelNode modelNode) + public override string PrintModel(ModelNode modelNode) { var result = new StringBuilder(); diff --git a/SPMeta2/SPMeta2/Services/ModelDotPrintServiceBase.cs b/SPMeta2/SPMeta2/Services/ModelDotPrintServiceBase.cs new file mode 100644 index 000000000..98c3710dd --- /dev/null +++ b/SPMeta2/SPMeta2/Services/ModelDotPrintServiceBase.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using SPMeta2.Models; + +namespace SPMeta2.Services +{ + public abstract class ModelDotGraphPrintServiceBase : ModelPrintServiceBase + { + + } +} diff --git a/SPMeta2/SPMeta2/Services/ModelPrettyPrintServiceBase.cs b/SPMeta2/SPMeta2/Services/ModelPrettyPrintServiceBase.cs new file mode 100644 index 000000000..efce930e2 --- /dev/null +++ b/SPMeta2/SPMeta2/Services/ModelPrettyPrintServiceBase.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using SPMeta2.Models; + +namespace SPMeta2.Services +{ + public abstract class ModelPrettyPrintServiceBase : ModelPrintServiceBase + { + + } +} diff --git a/SPMeta2/SPMeta2/Services/PrettyPrintServiceBase.cs b/SPMeta2/SPMeta2/Services/ModelPrintServiceBase.cs similarity index 60% rename from SPMeta2/SPMeta2/Services/PrettyPrintServiceBase.cs rename to SPMeta2/SPMeta2/Services/ModelPrintServiceBase.cs index c594899cc..8f5c2be9b 100644 --- a/SPMeta2/SPMeta2/Services/PrettyPrintServiceBase.cs +++ b/SPMeta2/SPMeta2/Services/ModelPrintServiceBase.cs @@ -7,10 +7,11 @@ namespace SPMeta2.Services { - public abstract class PrettyPrintServiceBase + public abstract class ModelPrintServiceBase { #region methods - public abstract string ToPrettyPrint(ModelNode modelNode); + public abstract string PrintModel(ModelNode modelNode); + #endregion } } From cc21124e64220e86de568c672bfb10c7796faf94 Mon Sep 17 00:00:00 2001 From: "support@subpointsolutions.com" Date: Thu, 11 Aug 2016 05:18:43 -0700 Subject: [PATCH 04/12] + Add 'ViewURL' property in 'XsltListViewWebPartDefinition' class #862 + CSOM/SSOM impl + added CanDeploy_XsltListViewWebPart_ByViewUrl test --- .../Webparts/ListViewWebPartModelHandler.cs | 12 +- .../XsltListViewWebPartModelHandler.cs | 14 +- ...tXsltListViewWebPartDefinitionValidator.cs | 62 +- .../XsltLIstViewWebPartDefinitionValidator.cs | 51 +- .../XsltListViewWebPartScenariosTest.cs | 55 ++ .../XsltListViewWebPartModelHandler.cs | 555 +++++++++--------- .../Webparts/ListViewWebPartDefinition.cs | 178 +++--- .../Webparts/XsltListViewWebPartDefinition.cs | 6 +- 8 files changed, 557 insertions(+), 376 deletions(-) diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/ListViewWebPartModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/ListViewWebPartModelHandler.cs index a9d83b39d..88f086b4f 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/ListViewWebPartModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/ListViewWebPartModelHandler.cs @@ -51,7 +51,7 @@ protected override void OnBeforeDeploy(ListItemModelHost host, WebPartDefinition _currentListBindContext = XsltListViewWebPartModelHandler.LookupBindContext(host, wpModel.WebUrl, wpModel.WebId, wpModel.ListUrl, wpModel.ListTitle, wpModel.ListId, - wpModel.ViewName, wpModel.ViewId, + wpModel.ViewUrl, wpModel.ViewName, wpModel.ViewId, wpModel.TitleUrl); if (_currentListBindContext.TargetView != null) @@ -73,7 +73,7 @@ protected override string GetWebpartXmlDefinition(ListItemModelHost listItemMode var bindContext = XsltListViewWebPartModelHandler.LookupBindContext(listItemModelHost, wpModel.WebUrl, wpModel.WebId, wpModel.ListUrl, wpModel.ListTitle, wpModel.ListId, - wpModel.ViewName, wpModel.ViewId, + wpModel.ViewUrl, wpModel.ViewName, wpModel.ViewId, wpModel.TitleUrl); var webId = listItemModelHost.HostWeb.Id; @@ -99,8 +99,8 @@ protected override void OnAfterDeploy(ListItemModelHost host, WebPartDefinitionB var bindingContext = XsltListViewWebPartModelHandler.LookupBindContext(host, wpModel.WebUrl, wpModel.WebId, - wpModel.ListUrl, wpModel.ListTitle, wpModel.ListId, - wpModel.ViewName, wpModel.ViewId, + wpModel.ListUrl, wpModel.ListTitle, wpModel.ListId, + wpModel.ViewUrl, wpModel.ViewName, wpModel.ViewId, wpModel.TitleUrl); // reverting back the dafult view @@ -209,8 +209,8 @@ protected override void InternalOnAfterWebPartProvision(WebPartProcessingContext var bindContext = XsltListViewWebPartModelHandler.LookupBindContext(listItemModelHost, typedDefinition.WebUrl, typedDefinition.WebId, - typedDefinition.ListUrl, typedDefinition.ListTitle, typedDefinition.ListId, - typedDefinition.ViewName, typedDefinition.ViewId, + typedDefinition.ListUrl, typedDefinition.ListTitle, typedDefinition.ListId, + typedDefinition.ViewUrl, typedDefinition.ViewName, typedDefinition.ViewId, typedDefinition.TitleUrl); if (provisionContext.WebPartStoreKey.HasValue diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/XsltListViewWebPartModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/XsltListViewWebPartModelHandler.cs index 7e8aa7056..368e0e32d 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/XsltListViewWebPartModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/Webparts/XsltListViewWebPartModelHandler.cs @@ -291,14 +291,14 @@ internal static ListBindContext LookupBindContext(ListItemModelHost listItemMode return LookupBindContext(listItemModelHost, wpModel.WebUrl, wpModel.WebId, wpModel.ListUrl, wpModel.ListTitle, wpModel.ListId, - wpModel.ViewName, wpModel.ViewId, + wpModel.ViewUrl, wpModel.ViewName, wpModel.ViewId, wpModel.TitleUrl); } internal static ListBindContext LookupBindContext(ListItemModelHost listItemModelHost, string webUrl, Guid? webId, string listUrl, string listTitle, Guid? listId, - string viewTitle, Guid? viewId, + string viewUrl, string viewTitle, Guid? viewId, string webPartTitleUrl ) { @@ -329,6 +329,16 @@ string webPartTitleUrl view = list.Views.GetById(viewId.Value); else if (!string.IsNullOrEmpty(viewTitle)) view = list.Views.GetByTitle(viewTitle); + else if (!string.IsNullOrEmpty(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(viewUrl.ToUpper())); + } context.Load(list, l => l.Id); context.Load(list, l => l.DefaultViewUrl); diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientXsltListViewWebPartDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientXsltListViewWebPartDefinitionValidator.cs index f28ddd547..3fb50a439 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientXsltListViewWebPartDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientXsltListViewWebPartDefinitionValidator.cs @@ -56,7 +56,17 @@ 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); + 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); context.Load(list, l => l.DefaultViewUrl); @@ -309,6 +319,56 @@ public override void DeployModel(object modelHost, DefinitionBase model) 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.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() + .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); + context.Load(targetView, l => l.BaseViewId, l => l.ViewFields, l => l.ViewQuery, l => l.RowLimit, l => l.JSLink); + + 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) + && (bindedView.JSLink == targetView.JSLink) + && (bindedView.BaseViewId == targetView.BaseViewId); + + 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.ViewName, "ViewName is null or empty. Skipping."); + } + // jslink if (!string.IsNullOrEmpty(definition.JSLink)) { diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/Webparts/XsltLIstViewWebPartDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/Webparts/XsltLIstViewWebPartDefinitionValidator.cs index 7e2aa91bd..b8682d151 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/Webparts/XsltLIstViewWebPartDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/Webparts/XsltLIstViewWebPartDefinitionValidator.cs @@ -14,6 +14,7 @@ using SPMeta2.Utils; using System.Xml.Linq; using SPMeta2.Enumerations; +using Microsoft.SharePoint; namespace SPMeta2.Regression.SSOM.Validation.Webparts { @@ -112,8 +113,10 @@ public override void DeployModel(object modelHost, DefinitionBase model) var hasList = !string.IsNullOrEmpty(definition.ListTitle) || !string.IsNullOrEmpty(definition.ListUrl) || definition.ListId.HasValue; + var hasView = !string.IsNullOrEmpty(definition.ViewName) || - definition.ViewId.HasValue; ; + !string.IsNullOrEmpty(definition.ViewUrl) || + definition.ViewId.HasValue; ; if (definition.CacheXslStorage.HasValue) assert.ShouldBeEqual(m => m.CacheXslStorage, o => o.CacheXslStorage); @@ -243,6 +246,37 @@ public override void DeployModel(object modelHost, DefinitionBase model) assert.SkipProperty(m => m.ViewName, "ViewName is null or empty. Skipping."); } + if (!string.IsNullOrEmpty(definition.ViewUrl)) + { + // web part gonna have hidden view + // so validation is a bit tricky, done by other properties + + assert.ShouldBeEqual((p, s, d) => + { + var srcView = targetList.Views.OfType() + .FirstOrDefault(v => v.ServerRelativeUrl.ToUpper().EndsWith(s.ViewUrl.ToUpper())); + var dstView = typedObject.View; + + var srcProp = s.GetExpressionValue(m => m.ViewUrl); + var dstProp = d.GetExpressionValue(o => o.View); + + var isValid = srcView.ViewFields.Count == dstView.ViewFields.Count + && srcView.Query == dstView.Query; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + assert.SkipProperty(m => m.ViewName, "ViewName is null or empty. Skipping."); + } + // JSLink if (!string.IsNullOrEmpty(definition.JSLink)) { @@ -341,9 +375,18 @@ public override void DeployModel(object modelHost, DefinitionBase model) assert.ShouldBeEqual((p, s, d) => { var srcProp = s.GetExpressionValue(m => m.TitleUrl); - var srcView = string.IsNullOrEmpty(s.ViewName) ? - targetList.Views[s.ViewId.Value] : - targetList.Views[s.ViewName]; + + SPView srcView = null; + + if (s.ViewId.HasValue && s.ViewId != default(Guid)) + srcView = targetList.Views[s.ViewId.Value]; + else if (!string.IsNullOrEmpty(s.ViewName)) + srcView = targetList.Views[s.ViewName]; + else if (!string.IsNullOrEmpty(s.ViewUrl)) + { + srcView = targetList.Views.OfType() + .FirstOrDefault(v => v.ServerRelativeUrl.ToUpper().EndsWith(s.ViewUrl.ToUpper())); + } return new PropertyValidationResult { diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/Webparts/XsltListViewWebPartScenariosTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/Webparts/XsltListViewWebPartScenariosTest.cs index dde13f62e..4b1341576 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/Webparts/XsltListViewWebPartScenariosTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/Webparts/XsltListViewWebPartScenariosTest.cs @@ -451,6 +451,61 @@ public void CanDeploy_XsltListViewWebPart_ByViewName() TestModel(model); } + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.XsltListViewWebPart")] + public void CanDeploy_XsltListViewWebPart_ByViewUrl() + { + // Add 'ViewURL' property in 'XsltListViewWebPartDefinition' class #862 + // https://github.com/SubPointSolutions/spmeta2/issues/862 + + var sourceList = ModelGeneratorService.GetRandomDefinition(def => { }); + var sourceView = ModelGeneratorService.GetRandomDefinition(def => + { + def.Fields = new System.Collections.ObjectModel.Collection + { + BuiltInInternalFieldNames.ID, + BuiltInInternalFieldNames.Edit, + BuiltInInternalFieldNames.Title + }; + + def.Url = string.Format("{0}.aspx", Rnd.String()); + def.IsDefault = false; + }); + + var xsltListViewWebpart = 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; + def.ViewUrl = sourceView.Url; + }); + + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddList(sourceList, list => + { + list.AddListView(sourceView); + }) + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddRandomWebPartPage(page => + { + page.AddXsltListViewWebPart(xsltListViewWebpart); + }); + }); + + }); + + TestModel(model); + } #endregion diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/Webparts/XsltListViewWebPartModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/Webparts/XsltListViewWebPartModelHandler.cs index 54ca3d7bf..75afaaa6c 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/Webparts/XsltListViewWebPartModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/Webparts/XsltListViewWebPartModelHandler.cs @@ -1,275 +1,280 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; - -using System.Xml; -using System.Xml.Linq; -using Microsoft.SharePoint; -using Microsoft.SharePoint.Utilities; -using Microsoft.SharePoint.WebPartPages; -using SPMeta2.Definitions; -using SPMeta2.Definitions.Webparts; -using SPMeta2.Enumerations; -using SPMeta2.Exceptions; -using SPMeta2.Services; -using SPMeta2.SSOM.ModelHandlers.Fields; -using SPMeta2.SSOM.ModelHosts; -using SPMeta2.Utils; -using WebPart = System.Web.UI.WebControls.WebParts.WebPart; - -namespace SPMeta2.SSOM.ModelHandlers.Webparts -{ - public class XsltListViewWebPartModelHandler : WebPartModelHandler - { - #region properties - - public override Type TargetType - { - get { return typeof(XsltListViewWebPartDefinition); } - } - - #endregion - - #region methods - - private WebpartPageModelHost _host; - - protected override void OnBeforeDeployModel(WebpartPageModelHost host, WebPartDefinition webpartModel) - { - _host = host; - - var typedModel = webpartModel.WithAssertAndCast("webpartModel", value => value.RequireNotNull()); - typedModel.WebpartType = typeof(XsltListViewWebPart).AssemblyQualifiedName; - } - - protected override void OnAfterDeployModel(WebpartPageModelHost host, WebPartDefinition definition) - { - var typedDefinition = definition.WithAssertAndCast("webpartModel", value => value.RequireNotNull()); - - if (!string.IsNullOrEmpty(typedDefinition.Toolbar)) - { - var existingWebPart = host.SPLimitedWebPartManager - .WebParts - .OfType() - .FirstOrDefault(wp => !string.IsNullOrEmpty(wp.ID) && - wp.ID.ToUpper() == definition.Id.ToUpper()); - - if (existingWebPart != null) - { - // patching up the view -> ToolbarType - var xsltWebPart = existingWebPart as XsltListViewWebPart; - - if (xsltWebPart != null) - { - - // big TODO for .NET 35 - // xsltWebPart.View does not exist for .NET 35 - // the implementation will be done upon the community demand - -#if !NET35 - - var targetView = xsltWebPart.View; - - // fixing up the Toolbar - if (!string.IsNullOrEmpty(typedDefinition.Toolbar)) - { - var htmlSchemaXml = XDocument.Parse(targetView.HtmlSchemaXml); - - var useShowAlwaysValue = - (typedDefinition.Toolbar.ToUpper() == BuiltInToolbarType.Standard.ToUpper()) - && typedDefinition.ToolbarShowAlways.HasValue - && typedDefinition.ToolbarShowAlways.Value; - - var toolbarNode = htmlSchemaXml.Root - .Descendants("Toolbar") - .FirstOrDefault(); - - if (toolbarNode == null) - { - toolbarNode = new XElement("Toolbar"); - htmlSchemaXml.Root.Add(toolbarNode); - } - - toolbarNode.SetAttributeValue("Type", typedDefinition.Toolbar); - - if (useShowAlwaysValue) - { - toolbarNode.SetAttributeValue("ShowAlways", "TRUE"); - } - else - { - XAttribute attr = toolbarNode.Attribute("ShowAlways"); - if (attr != null && string.IsNullOrEmpty(attr.Value)) - attr.Remove(); - } - - var field = targetView.GetType() - .GetProperty("ListViewXml", - BindingFlags.NonPublic | BindingFlags.Instance); - - if (field != null) - { - field.SetValue(targetView, htmlSchemaXml.Root.GetInnerXmlAsString(), null); - } - } - - targetView.Update(); - -#endif - } - } - } - } - - - public static SPList GetTargetList(SPWeb targetWeb, string listTitle, string listUrl, Guid? listId) - { - SPList result = null; - - if (listId.HasValue && listId != default(Guid)) - result = targetWeb.Lists[listId.Value]; - else if (!string.IsNullOrEmpty(listUrl)) - result = targetWeb.GetList(SPUrlUtility.CombineUrl(targetWeb.ServerRelativeUrl, listUrl)); - else if (!string.IsNullOrEmpty(listTitle)) - result = targetWeb.Lists.TryGetList(listTitle); - else - { - throw new SPMeta2Exception("ListUrl, ListTitle or ListId should be defined."); - } - - return result; - } - - protected override void ProcessWebpartProperties(WebPart webpartInstance, WebPartDefinition webpartModel) - { - base.ProcessWebpartProperties(webpartInstance, webpartModel); - - var typedWebpart = webpartInstance.WithAssertAndCast("webpartInstance", value => value.RequireNotNull()); - var typedModel = webpartModel.WithAssertAndCast("webpartModel", value => value.RequireNotNull()); - - var web = _host.SPLimitedWebPartManager.Web; - - // bind list - var targetWeb = web; - - if (!string.IsNullOrEmpty(typedModel.WebUrl) || typedModel.WebId.HasGuidValue()) - targetWeb = new LookupFieldModelHandler().GetTargetWeb(web.Site, typedModel.WebUrl, typedModel.WebId); - - var list = GetTargetList(targetWeb, typedModel.ListTitle, typedModel.ListUrl, typedModel.ListId); - - if (list != null) - { - // for the list from other than current webs - typedWebpart.WebId = targetWeb.ID; - - typedWebpart.ListName = list.ID.ToString("B").ToUpperInvariant(); - typedWebpart.TitleUrl = list.DefaultViewUrl; - } - - // view check - if (list != null) - { - SPView srcView = null; - - if (typedModel.ViewId.HasValue && typedModel.ViewId != default(Guid)) - srcView = list.Views[typedModel.ViewId.Value]; - else if (!string.IsNullOrEmpty(typedModel.ViewName)) - srcView = list.Views[typedModel.ViewName]; - - if (srcView != null) - { - if (!string.IsNullOrEmpty(typedWebpart.ViewGuid)) - { - // update hidden view, otherwise we can have weird SharePoint exception - // https://github.com/SubPointSolutions/spmeta2/issues/487 - - var hiddenView = list.Views[new Guid(typedWebpart.ViewGuid)]; - - hiddenView.SetViewXml(srcView.GetViewXml()); - - hiddenView.Update(); - } - else - { - typedWebpart.ViewGuid = srcView.ID.ToString("B").ToUpperInvariant(); - } - - typedWebpart.TitleUrl = srcView.ServerRelativeUrl; - } - } - - // able to 'reset', if NULL or use list-view based URLs - if (!string.IsNullOrEmpty(typedModel.TitleUrl)) - typedWebpart.TitleUrl = typedModel.TitleUrl; - - // weird, but it must be set to avoid null-ref exceptions - typedWebpart.GhostedXslLink = "main.xsl"; - -#if !NET35 - // rest - typedWebpart.JSLink = typedModel.JSLink; -#endif - - if (typedModel.CacheXslStorage.HasValue) - typedWebpart.CacheXslStorage = typedModel.CacheXslStorage.Value; - - if (typedModel.CacheXslTimeOut.HasValue) - typedWebpart.CacheXslTimeOut = typedModel.CacheXslTimeOut.Value; - -#if !NET35 - if (typedModel.ShowTimelineIfAvailable.HasValue) - typedWebpart.ShowTimelineIfAvailable = typedModel.ShowTimelineIfAvailable.Value; -#endif - - if (!string.IsNullOrEmpty(typedModel.Xsl)) - { - typedWebpart.Xsl = typedModel.Xsl; - } - - if (!string.IsNullOrEmpty(typedModel.XslLink)) - { - var urlValue = typedModel.XslLink; - - typedWebpart.XslLink = urlValue; - } - - if (!string.IsNullOrEmpty(typedModel.XmlDefinition)) - { - typedWebpart.XmlDefinition = typedModel.XmlDefinition; - } - - if (!string.IsNullOrEmpty(typedModel.XmlDefinitionLink)) - { - var urlValue = typedModel.XmlDefinitionLink; - typedWebpart.XmlDefinitionLink = urlValue; - } - - if (!string.IsNullOrEmpty(typedModel.GhostedXslLink)) - { - var urlValue = typedModel.GhostedXslLink; - typedWebpart.GhostedXslLink = urlValue; - } - - if (!string.IsNullOrEmpty(typedModel.BaseXsltHashKey)) - typedWebpart.BaseXsltHashKey = typedModel.BaseXsltHashKey; - - if (typedModel.DisableColumnFiltering.HasValue) - typedWebpart.DisableColumnFiltering = typedModel.DisableColumnFiltering.Value; - -#if !NET35 - if (typedModel.DisableSaveAsNewViewButton.HasValue) - typedWebpart.DisableSaveAsNewViewButton = typedModel.DisableSaveAsNewViewButton.Value; - - if (typedModel.DisableViewSelectorMenu.HasValue) - typedWebpart.DisableViewSelectorMenu = typedModel.DisableViewSelectorMenu.Value; - - if (typedModel.InplaceSearchEnabled.HasValue) - typedWebpart.InplaceSearchEnabled = typedModel.InplaceSearchEnabled.Value; -#endif - } - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; + +using System.Xml; +using System.Xml.Linq; +using Microsoft.SharePoint; +using Microsoft.SharePoint.Utilities; +using Microsoft.SharePoint.WebPartPages; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Webparts; +using SPMeta2.Enumerations; +using SPMeta2.Exceptions; +using SPMeta2.Services; +using SPMeta2.SSOM.ModelHandlers.Fields; +using SPMeta2.SSOM.ModelHosts; +using SPMeta2.Utils; +using WebPart = System.Web.UI.WebControls.WebParts.WebPart; + +namespace SPMeta2.SSOM.ModelHandlers.Webparts +{ + public class XsltListViewWebPartModelHandler : WebPartModelHandler + { + #region properties + + public override Type TargetType + { + get { return typeof(XsltListViewWebPartDefinition); } + } + + #endregion + + #region methods + + private WebpartPageModelHost _host; + + protected override void OnBeforeDeployModel(WebpartPageModelHost host, WebPartDefinition webpartModel) + { + _host = host; + + var typedModel = webpartModel.WithAssertAndCast("webpartModel", value => value.RequireNotNull()); + typedModel.WebpartType = typeof(XsltListViewWebPart).AssemblyQualifiedName; + } + + protected override void OnAfterDeployModel(WebpartPageModelHost host, WebPartDefinition definition) + { + var typedDefinition = definition.WithAssertAndCast("webpartModel", value => value.RequireNotNull()); + + if (!string.IsNullOrEmpty(typedDefinition.Toolbar)) + { + var existingWebPart = host.SPLimitedWebPartManager + .WebParts + .OfType() + .FirstOrDefault(wp => !string.IsNullOrEmpty(wp.ID) && + wp.ID.ToUpper() == definition.Id.ToUpper()); + + if (existingWebPart != null) + { + // patching up the view -> ToolbarType + var xsltWebPart = existingWebPart as XsltListViewWebPart; + + if (xsltWebPart != null) + { + + // big TODO for .NET 35 + // xsltWebPart.View does not exist for .NET 35 + // the implementation will be done upon the community demand + +#if !NET35 + + var targetView = xsltWebPart.View; + + // fixing up the Toolbar + if (!string.IsNullOrEmpty(typedDefinition.Toolbar)) + { + var htmlSchemaXml = XDocument.Parse(targetView.HtmlSchemaXml); + + var useShowAlwaysValue = + (typedDefinition.Toolbar.ToUpper() == BuiltInToolbarType.Standard.ToUpper()) + && typedDefinition.ToolbarShowAlways.HasValue + && typedDefinition.ToolbarShowAlways.Value; + + var toolbarNode = htmlSchemaXml.Root + .Descendants("Toolbar") + .FirstOrDefault(); + + if (toolbarNode == null) + { + toolbarNode = new XElement("Toolbar"); + htmlSchemaXml.Root.Add(toolbarNode); + } + + toolbarNode.SetAttributeValue("Type", typedDefinition.Toolbar); + + if (useShowAlwaysValue) + { + toolbarNode.SetAttributeValue("ShowAlways", "TRUE"); + } + else + { + XAttribute attr = toolbarNode.Attribute("ShowAlways"); + if (attr != null && string.IsNullOrEmpty(attr.Value)) + attr.Remove(); + } + + var field = targetView.GetType() + .GetProperty("ListViewXml", + BindingFlags.NonPublic | BindingFlags.Instance); + + if (field != null) + { + field.SetValue(targetView, htmlSchemaXml.Root.GetInnerXmlAsString(), null); + } + } + + targetView.Update(); + +#endif + } + } + } + } + + + public static SPList GetTargetList(SPWeb targetWeb, string listTitle, string listUrl, Guid? listId) + { + SPList result = null; + + if (listId.HasValue && listId != default(Guid)) + result = targetWeb.Lists[listId.Value]; + else if (!string.IsNullOrEmpty(listUrl)) + result = targetWeb.GetList(SPUrlUtility.CombineUrl(targetWeb.ServerRelativeUrl, listUrl)); + else if (!string.IsNullOrEmpty(listTitle)) + result = targetWeb.Lists.TryGetList(listTitle); + else + { + throw new SPMeta2Exception("ListUrl, ListTitle or ListId should be defined."); + } + + return result; + } + + protected override void ProcessWebpartProperties(WebPart webpartInstance, WebPartDefinition webpartModel) + { + base.ProcessWebpartProperties(webpartInstance, webpartModel); + + var typedWebpart = webpartInstance.WithAssertAndCast("webpartInstance", value => value.RequireNotNull()); + var typedModel = webpartModel.WithAssertAndCast("webpartModel", value => value.RequireNotNull()); + + var web = _host.SPLimitedWebPartManager.Web; + + // bind list + var targetWeb = web; + + if (!string.IsNullOrEmpty(typedModel.WebUrl) || typedModel.WebId.HasGuidValue()) + targetWeb = new LookupFieldModelHandler().GetTargetWeb(web.Site, typedModel.WebUrl, typedModel.WebId); + + var list = GetTargetList(targetWeb, typedModel.ListTitle, typedModel.ListUrl, typedModel.ListId); + + if (list != null) + { + // for the list from other than current webs + typedWebpart.WebId = targetWeb.ID; + + typedWebpart.ListName = list.ID.ToString("B").ToUpperInvariant(); + typedWebpart.TitleUrl = list.DefaultViewUrl; + } + + // view check + if (list != null) + { + SPView srcView = null; + + if (typedModel.ViewId.HasValue && typedModel.ViewId != default(Guid)) + srcView = list.Views[typedModel.ViewId.Value]; + else if (!string.IsNullOrEmpty(typedModel.ViewName)) + srcView = list.Views[typedModel.ViewName]; + else if (!string.IsNullOrEmpty(typedModel.ViewUrl)) + { + srcView = list.Views.OfType() + .FirstOrDefault(v => v.ServerRelativeUrl.ToUpper().EndsWith(typedModel.ViewUrl.ToUpper())); + } + + if (srcView != null) + { + if (!string.IsNullOrEmpty(typedWebpart.ViewGuid)) + { + // update hidden view, otherwise we can have weird SharePoint exception + // https://github.com/SubPointSolutions/spmeta2/issues/487 + + var hiddenView = list.Views[new Guid(typedWebpart.ViewGuid)]; + + hiddenView.SetViewXml(srcView.GetViewXml()); + + hiddenView.Update(); + } + else + { + typedWebpart.ViewGuid = srcView.ID.ToString("B").ToUpperInvariant(); + } + + typedWebpart.TitleUrl = srcView.ServerRelativeUrl; + } + } + + // able to 'reset', if NULL or use list-view based URLs + if (!string.IsNullOrEmpty(typedModel.TitleUrl)) + typedWebpart.TitleUrl = typedModel.TitleUrl; + + // weird, but it must be set to avoid null-ref exceptions + typedWebpart.GhostedXslLink = "main.xsl"; + +#if !NET35 + // rest + typedWebpart.JSLink = typedModel.JSLink; +#endif + + if (typedModel.CacheXslStorage.HasValue) + typedWebpart.CacheXslStorage = typedModel.CacheXslStorage.Value; + + if (typedModel.CacheXslTimeOut.HasValue) + typedWebpart.CacheXslTimeOut = typedModel.CacheXslTimeOut.Value; + +#if !NET35 + if (typedModel.ShowTimelineIfAvailable.HasValue) + typedWebpart.ShowTimelineIfAvailable = typedModel.ShowTimelineIfAvailable.Value; +#endif + + if (!string.IsNullOrEmpty(typedModel.Xsl)) + { + typedWebpart.Xsl = typedModel.Xsl; + } + + if (!string.IsNullOrEmpty(typedModel.XslLink)) + { + var urlValue = typedModel.XslLink; + + typedWebpart.XslLink = urlValue; + } + + if (!string.IsNullOrEmpty(typedModel.XmlDefinition)) + { + typedWebpart.XmlDefinition = typedModel.XmlDefinition; + } + + if (!string.IsNullOrEmpty(typedModel.XmlDefinitionLink)) + { + var urlValue = typedModel.XmlDefinitionLink; + typedWebpart.XmlDefinitionLink = urlValue; + } + + if (!string.IsNullOrEmpty(typedModel.GhostedXslLink)) + { + var urlValue = typedModel.GhostedXslLink; + typedWebpart.GhostedXslLink = urlValue; + } + + if (!string.IsNullOrEmpty(typedModel.BaseXsltHashKey)) + typedWebpart.BaseXsltHashKey = typedModel.BaseXsltHashKey; + + if (typedModel.DisableColumnFiltering.HasValue) + typedWebpart.DisableColumnFiltering = typedModel.DisableColumnFiltering.Value; + +#if !NET35 + if (typedModel.DisableSaveAsNewViewButton.HasValue) + typedWebpart.DisableSaveAsNewViewButton = typedModel.DisableSaveAsNewViewButton.Value; + + if (typedModel.DisableViewSelectorMenu.HasValue) + typedWebpart.DisableViewSelectorMenu = typedModel.DisableViewSelectorMenu.Value; + + if (typedModel.InplaceSearchEnabled.HasValue) + typedWebpart.InplaceSearchEnabled = typedModel.InplaceSearchEnabled.Value; +#endif + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/Definitions/Webparts/ListViewWebPartDefinition.cs b/SPMeta2/SPMeta2/Definitions/Webparts/ListViewWebPartDefinition.cs index 36c6b71cf..e73193ce2 100644 --- a/SPMeta2/SPMeta2/Definitions/Webparts/ListViewWebPartDefinition.cs +++ b/SPMeta2/SPMeta2/Definitions/Webparts/ListViewWebPartDefinition.cs @@ -1,87 +1,91 @@ -using System; -using System.Runtime.Serialization; -using SPMeta2.Attributes; -using SPMeta2.Attributes.Regression; -using SPMeta2.Utils; - -namespace SPMeta2.Definitions.Webparts -{ - /// - /// Allows to define and deploy 'List View' web part. - /// - [SPObjectType(SPObjectModelType.SSOM, "System.Web.UI.WebControls.WebParts.WebPart", "System.Web")] - [SPObjectType(SPObjectModelType.CSOM, "Microsoft.SharePoint.Client.WebParts.WebPart", "Microsoft.SharePoint.Client")] - - [DefaultRootHost(typeof(WebDefinition))] - [DefaultParentHost(typeof(WebPartPageDefinition))] - - [Serializable] - [DataContract] - [ExpectArrayExtensionMethod] - - [ExpectManyInstances] - [ExpectWebpartType(WebPartType = "Microsoft.SharePoint.WebPartPages.ListViewWebPart, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")] - - public class ListViewWebPartDefinition : WebPartDefinition - { - #region properties - - [ExpectValidation] - [DataMember] - public string WebUrl { get; set; } - - [ExpectValidation] - [DataMember] - public Guid? WebId { get; set; } - - [ExpectValidation] - [DataMember] - public string ListTitle { get; set; } - - [ExpectValidation] - [DataMember] - public string ListUrl { get; set; } - - [ExpectValidation] - [DataMember] - public Guid? ListId { get; set; } - - [ExpectValidation] - [DataMember] - public string ViewName { get; set; } - - [ExpectValidation] - [DataMember] - public Guid? ViewId { get; set; } - - [ExpectValidation] - [ExpectUpdatAsToolbarType] - [ExpectNullable] - [DataMember] - public string Toolbar { get; set; } - - [ExpectValidation] - [ExpectUpdate] - [ExpectNullable] - [DataMember] - public bool? ToolbarShowAlways { get; set; } - - #endregion - - #region methods - - public override string ToString() - { - return new ToStringResult(this, base.ToString()) - .AddPropertyValue(p => p.ListTitle) - .AddPropertyValue(p => p.ListUrl) - .AddPropertyValue(p => p.ListId) - - .AddPropertyValue(p => p.ViewName) - .AddPropertyValue(p => p.ViewId) - .ToString(); - } - - #endregion - } -} +using System; +using System.Runtime.Serialization; +using SPMeta2.Attributes; +using SPMeta2.Attributes.Regression; +using SPMeta2.Utils; + +namespace SPMeta2.Definitions.Webparts +{ + /// + /// Allows to define and deploy 'List View' web part. + /// + [SPObjectType(SPObjectModelType.SSOM, "System.Web.UI.WebControls.WebParts.WebPart", "System.Web")] + [SPObjectType(SPObjectModelType.CSOM, "Microsoft.SharePoint.Client.WebParts.WebPart", "Microsoft.SharePoint.Client")] + + [DefaultRootHost(typeof(WebDefinition))] + [DefaultParentHost(typeof(WebPartPageDefinition))] + + [Serializable] + [DataContract] + [ExpectArrayExtensionMethod] + + [ExpectManyInstances] + [ExpectWebpartType(WebPartType = "Microsoft.SharePoint.WebPartPages.ListViewWebPart, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")] + + public class ListViewWebPartDefinition : WebPartDefinition + { + #region properties + + [ExpectValidation] + [DataMember] + public string WebUrl { get; set; } + + [ExpectValidation] + [DataMember] + public Guid? WebId { get; set; } + + [ExpectValidation] + [DataMember] + public string ListTitle { get; set; } + + [ExpectValidation] + [DataMember] + public string ListUrl { get; set; } + + [ExpectValidation] + [DataMember] + public Guid? ListId { get; set; } + + [ExpectValidation] + [DataMember] + public string ViewName { get; set; } + + [ExpectValidation] + [DataMember] + public Guid? ViewId { get; set; } + + [ExpectValidation] + [DataMember] + public string ViewUrl { get; set; } + + [ExpectValidation] + [ExpectUpdatAsToolbarType] + [ExpectNullable] + [DataMember] + public string Toolbar { get; set; } + + [ExpectValidation] + [ExpectUpdate] + [ExpectNullable] + [DataMember] + public bool? ToolbarShowAlways { get; set; } + + #endregion + + #region methods + + public override string ToString() + { + return new ToStringResult(this, base.ToString()) + .AddPropertyValue(p => p.ListTitle) + .AddPropertyValue(p => p.ListUrl) + .AddPropertyValue(p => p.ListId) + + .AddPropertyValue(p => p.ViewName) + .AddPropertyValue(p => p.ViewId) + .ToString(); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/Definitions/Webparts/XsltListViewWebPartDefinition.cs b/SPMeta2/SPMeta2/Definitions/Webparts/XsltListViewWebPartDefinition.cs index f0978b313..03963a31b 100644 --- a/SPMeta2/SPMeta2/Definitions/Webparts/XsltListViewWebPartDefinition.cs +++ b/SPMeta2/SPMeta2/Definitions/Webparts/XsltListViewWebPartDefinition.cs @@ -65,7 +65,11 @@ public XsltListViewWebPartDefinition() [ExpectValidation] [DataMember] - public Guid? ViewId { get; set; } + public Guid? ViewId { get; set; } + + [ExpectValidation] + [DataMember] + public string ViewUrl { get; set; } [ExpectValidation] [DataMember] From b5c537d9682a7d443e89ee23d3da4e6dbfde7b26 Mon Sep 17 00:00:00 2001 From: "support@subpointsolutions.com" Date: Thu, 11 Aug 2016 05:40:43 -0700 Subject: [PATCH 05/12] + Add 'ViewURL' property in 'ListViewWebPartDefinition' class #870 + added implementation for CSOM/SSOM + CanDeploy_ListViewWebPart_ByViewName test --- ...lientListViewWebPartDefinitionValidator.cs | 53 +++++++++++++++++- ...tXsltListViewWebPartDefinitionValidator.cs | 4 +- .../ListViewWebPartDefinitionValidator.cs | 52 ++++++++++++++++-- .../XsltLIstViewWebPartDefinitionValidator.cs | 2 +- .../Scenarios/ListViewWebPartScenariosTest.cs | 54 ++++++++++++++++++- .../Webparts/ListViewWebPartModelHandler.cs | 7 ++- 6 files changed, 161 insertions(+), 11 deletions(-) diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientListViewWebPartDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientListViewWebPartDefinitionValidator.cs index 3f828e55b..fae624fa6 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientListViewWebPartDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientListViewWebPartDefinitionValidator.cs @@ -239,6 +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."); } // skip it, it will be part of the .Toolbar validation @@ -347,7 +388,17 @@ 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); + 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); context.Load(list, l => l.DefaultViewUrl); diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientXsltListViewWebPartDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientXsltListViewWebPartDefinitionValidator.cs index 3fb50a439..5bae940f9 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientXsltListViewWebPartDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/Webparts/ClientXsltListViewWebPartDefinitionValidator.cs @@ -365,8 +365,8 @@ public override void DeployModel(object modelHost, DefinitionBase model) }); } else - { - assert.SkipProperty(m => m.ViewName, "ViewName is null or empty. Skipping."); + { + assert.SkipProperty(m => m.ViewUrl, "ViewUrl is null or empty. Skipping."); } // jslink diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/Webparts/ListViewWebPartDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/Webparts/ListViewWebPartDefinitionValidator.cs index 33c2f0b3a..0a5156843 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/Webparts/ListViewWebPartDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/Webparts/ListViewWebPartDefinitionValidator.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Text; using System.Xml.Linq; +using Microsoft.SharePoint; using Microsoft.SharePoint.WebPartPages; using SPMeta2.Containers.Assertion; using SPMeta2.Definitions; @@ -117,7 +118,8 @@ public override void DeployModel(object modelHost, DefinitionBase model) var hasList = !string.IsNullOrEmpty(definition.ListTitle) || !string.IsNullOrEmpty(definition.ListUrl) || definition.ListId.HasValue; - var hasView = !string.IsNullOrEmpty(definition.ViewName) || + var hasView = !string.IsNullOrEmpty(definition.ViewName) || + !string.IsNullOrEmpty(definition.ViewUrl) || definition.ViewId.HasValue; ; // list @@ -231,6 +233,38 @@ 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)) + { + // web part gonna have hidden view + // so validation is a bit tricky, done by other properties + + assert.ShouldBeEqual((p, s, d) => + { + var srcView = targetList.Views.OfType() + .FirstOrDefault(v => v.ServerRelativeUrl.ToUpper().EndsWith(s.ViewUrl.ToUpper())); + + var dstView = targetList.Views[new Guid(typedObject.ViewGuid)]; + + var srcProp = s.GetExpressionValue(m => m.ViewUrl); + var dstProp = d.GetExpressionValue(o => o.ViewGuid); + + var isValid = srcView.ViewFields.Count == dstView.ViewFields.Count + && srcView.Query == dstView.Query; + + return new PropertyValidationResult + { + Tag = p.Tag, + Src = srcProp, + Dst = null, + IsValid = isValid + }; + }); + } + else + { + assert.SkipProperty(m => m.ViewUrl, "ViewName is null or empty. Skipping."); } // title link @@ -241,10 +275,18 @@ public override void DeployModel(object modelHost, DefinitionBase model) { assert.ShouldBeEqual((p, s, d) => { - var srcProp = s.GetExpressionValue(m => m.TitleUrl); - var srcView = string.IsNullOrEmpty(s.ViewName) ? - targetList.Views[s.ViewId.Value] : - targetList.Views[s.ViewName]; + var srcProp = s.GetExpressionValue(m => m.TitleUrl); + SPView srcView = null; + + if (s.ViewId.HasValue && s.ViewId != default(Guid)) + srcView = targetList.Views[s.ViewId.Value]; + else if (!string.IsNullOrEmpty(s.ViewName)) + srcView = targetList.Views[s.ViewName]; + else if (!string.IsNullOrEmpty(s.ViewUrl)) + { + srcView = targetList.Views.OfType() + .FirstOrDefault(v => v.ServerRelativeUrl.ToUpper().EndsWith(s.ViewUrl.ToUpper())); + } return new PropertyValidationResult { diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/Webparts/XsltLIstViewWebPartDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/Webparts/XsltLIstViewWebPartDefinitionValidator.cs index b8682d151..bdc07657b 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/Webparts/XsltLIstViewWebPartDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/Webparts/XsltLIstViewWebPartDefinitionValidator.cs @@ -274,7 +274,7 @@ public override void DeployModel(object modelHost, DefinitionBase model) } else { - assert.SkipProperty(m => m.ViewName, "ViewName is null or empty. Skipping."); + assert.SkipProperty(m => m.ViewUrl, "ViewName is null or empty. Skipping."); } // JSLink diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ListViewWebPartScenariosTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ListViewWebPartScenariosTest.cs index c6f669d41..12b6e4bd9 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ListViewWebPartScenariosTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/ListViewWebPartScenariosTest.cs @@ -273,9 +273,61 @@ public void CanDeploy_ListViewWebPart_ByViewName() }); TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViewWebPart")] + public void CanDeploy_ListViewWebPart_ByViewUrl() + { + var sourceList = ModelGeneratorService.GetRandomDefinition(def => { }); + var sourceView = ModelGeneratorService.GetRandomDefinition(def => + { + def.Fields = new System.Collections.ObjectModel.Collection + { + BuiltInInternalFieldNames.ID, + BuiltInInternalFieldNames.Edit, + BuiltInInternalFieldNames.Title + }; + + def.Url = string.Format("{0}.aspx", Rnd.String()); + 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; + def.ViewUrl = sourceView.Url; + }); + + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddList(sourceList, list => + { + list.AddListView(sourceView); + }) + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddRandomWebPartPage(page => + { + page.AddListViewWebPart(listViewWebpart); + }); + }); + + }); + + TestModel(model); } - #endregion #region calendar provision issue diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/Webparts/ListViewWebPartModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/Webparts/ListViewWebPartModelHandler.cs index 3cb72297e..afddc4a01 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/Webparts/ListViewWebPartModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/Webparts/ListViewWebPartModelHandler.cs @@ -69,7 +69,12 @@ protected override void ProcessWebpartProperties(WebPart webpartInstance, WebPar if (typedModel.ViewId.HasGuidValue()) view = list.Views[typedModel.ViewId.Value]; else if (!string.IsNullOrEmpty(typedModel.ViewName)) - view = list.Views[typedModel.ViewName]; + view = list.Views[typedModel.ViewName]; + else if (!string.IsNullOrEmpty(typedModel.ViewUrl)) + { + view = list.Views.OfType() + .FirstOrDefault(v => v.ServerRelativeUrl.ToUpper().EndsWith(typedModel.ViewUrl.ToUpper())); + } if (view != null) { From 2ba43a015b5299c8f75c83a94d332a7fbcc43789 Mon Sep 17 00:00:00 2001 From: "support@subpointsolutions.com" Date: Thu, 11 Aug 2016 06:23:17 -0700 Subject: [PATCH 06/12] + Enhance WorkflowAssociationDefinition - support deployment under content type #867 + SSOM implementation + new test, passed the following: * CanDeploy_WorkflowAssociation_UnderWeb * CanDeploy_WorkflowAssociation_UnderList * CanDeploy_WorkflowAssociation_UnderContentType --- .../WorkflowAssociationDefinitionValidator.cs | 1 - .../WorkflowAssociationScenariosTest.cs | 73 ++- .../WorkflowAssociationModelHandler.cs | 505 +++++++++++------- SPMeta2/SPMeta2/Common/DefaultModelWeigh.cs | 1 + .../Default/ContentTypeDefinitionSyntax.cs | 3 +- 5 files changed, 390 insertions(+), 193 deletions(-) diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Validation/WorkflowAssociationDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.SSOM/Validation/WorkflowAssociationDefinitionValidator.cs index f3b6ec0ad..2f45cb359 100644 --- a/SPMeta2/SPMeta2.Regression.SSOM/Validation/WorkflowAssociationDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.SSOM/Validation/WorkflowAssociationDefinitionValidator.cs @@ -17,7 +17,6 @@ public override void DeployModel(object modelHost, DefinitionBase model) var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); var spObject = FindExistringWorkflowAssotiation(modelHost, definition); - var assert = ServiceFactory.AssertService.NewAssert(definition, spObject); assert diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs index fd4bab4f1..9f4855216 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs @@ -60,28 +60,43 @@ public static void Cleanup() // TestModel(model); //} + + [TestMethod] - [TestCategory("Regression.Scenarios. WorkflowAssociation")] + [TestCategory("Regression.Scenarios.WorkflowAssociation")] public void CanDeploy_WorkflowAssociation_UnderWeb() { - WithExcpectedException(typeof(SPMeta2NotImplementedException), () => + var taskList = ModelGeneratorService.GetRandomDefinition(def => { - var workflowDef = ModelGeneratorService.GetRandomDefinition(def => - { + def.Hidden = true; + def.TemplateType = BuiltInListTemplateTypeId.Tasks; + }); - }); + var historyList = ModelGeneratorService.GetRandomDefinition(def => + { + def.Hidden = true; + def.TemplateType = BuiltInListTemplateTypeId.WorkflowHistory; + }); - var model = SPMeta2Model.NewWebModel(web => - { - web.AddWorkflowAssociation(workflowDef); - }); + var workflowDef = ModelGeneratorService.GetRandomDefinition(def => + { + def.TaskListTitle = taskList.Title; + def.HistoryListTitle = historyList.Title; + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddList(taskList); + web.AddList(historyList); - TestModel(model); + web.AddWorkflowAssociation(workflowDef); }); + + TestModel(model); } [TestMethod] - [TestCategory("Regression.Scenarios. WorkflowAssociation")] + [TestCategory("Regression.Scenarios.WorkflowAssociation")] public void CanDeploy_WorkflowAssociation_UnderList() { var taskList = ModelGeneratorService.GetRandomDefinition(def => @@ -115,5 +130,41 @@ public void CanDeploy_WorkflowAssociation_UnderList() TestModel(model); } + + [TestMethod] + [TestCategory("Regression.Scenarios.WorkflowAssociation")] + public void CanDeploy_WorkflowAssociation_UnderContentType() + { + // Enhance WorkflowAssociationDefinition - support deployment under content type #867 + // https://github.com/SubPointSolutions/spmeta2/issues/867 + + 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 model = SPMeta2Model.NewSiteModel(site => + { + site.AddRandomContentType(contentType => + { + contentType.AddWorkflowAssociation(workflowDef); + }); + }); + + TestModel(model); + } } } diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/WorkflowAssociationModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/WorkflowAssociationModelHandler.cs index d3223a115..7f706e4c5 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/WorkflowAssociationModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/WorkflowAssociationModelHandler.cs @@ -1,180 +1,325 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Microsoft.SharePoint.Workflow; -using SPMeta2.Definitions; -using SPMeta2.Exceptions; -using SPMeta2.SSOM.ModelHosts; -using SPMeta2.Utils; -using Microsoft.SharePoint; -using SPMeta2.Common; -using SPMeta2.Enumerations; - -namespace SPMeta2.SSOM.ModelHandlers -{ - public class WorkflowAssociationModelHandler : SSOMModelHandlerBase - { - #region propeties - public override Type TargetType - { - get { return typeof(WorkflowAssociationDefinition); } - } - #endregion - - #region methods - - public override void DeployModel(object modelHost, DefinitionBase model) - { - var workflowAssociationModel = model.WithAssertAndCast("model", value => value.RequireNotNull()); - - if (modelHost is ListModelHost) - { - var listModelHost = (modelHost as ListModelHost); - var list = listModelHost.HostList; - - DeployListWorkflowAssociationDefinition(listModelHost, list, workflowAssociationModel); - } - else if (modelHost is WebModelHost) - { - var webModelHost = (modelHost as WebModelHost); - var web = webModelHost.HostWeb; - - DeployWebWorkflowAssociationDefinition(webModelHost, web, workflowAssociationModel); - } - else - { - throw new SPMeta2NotSupportedException("model host should be of type ListModelHost or WebModelHost"); - } - } - - private SPWeb GetWebFromModelHost(object modelHost) - { - if (modelHost is ListModelHost) - { - return (modelHost as ListModelHost).HostList.ParentWeb; - } - - if (modelHost is WebModelHost) - { - return (modelHost as WebModelHost).HostWeb; - } - - - throw new SPMeta2NotSupportedException("model host should be of type ListModelHost or WebModelHost"); - - } - - protected SPWorkflowAssociation FindExistringWorkflowAssotiation(object modelHost, WorkflowAssociationDefinition def) - { - if (modelHost is ListModelHost) - { - var list = (modelHost as ListModelHost).HostList; - - return list.WorkflowAssociations - .GetAssociationByName(def.Name, list.ParentWeb.UICulture); - } - - if (modelHost is WebModelHost) - { - throw new SPMeta2NotImplementedException("WorkflowAssociation under web is not implemented yet"); - } - - - throw new SPMeta2NotSupportedException("model host should be of type ListModelHost or WebModelHost"); - } - - private SPWorkflowTemplate GetWorkflowTemplate(object modelHost, WorkflowAssociationDefinition def) - { - var targetWeb = GetWebFromModelHost(modelHost); - return targetWeb.WorkflowTemplates.GetTemplateByName(def.WorkflowTemplateName, targetWeb.UICulture); - } - - private void DeployWebWorkflowAssociationDefinition(WebModelHost webModelHost, Microsoft.SharePoint.SPWeb web, WorkflowAssociationDefinition workflowAssociationModel) - { - // TODO - } - - private void DeployListWorkflowAssociationDefinition(ListModelHost modelHost, SPList list, WorkflowAssociationDefinition definition) - { - var existingWorkflowAssotiation = FindExistringWorkflowAssotiation(modelHost, definition); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioning, - Object = existingWorkflowAssotiation, - ObjectType = typeof(SPWorkflowAssociation), - ObjectDefinition = definition, - ModelHost = modelHost - }); - - bool isNew = false; - - if (existingWorkflowAssotiation == null) - { - var workflowTemplate = GetWorkflowTemplate(modelHost, definition); - - if (workflowTemplate == null) - { - throw new SPMeta2Exception( - string.Format("Cannot find workflow template by definition:[{0}]", definition)); - } - - existingWorkflowAssotiation = SPWorkflowAssociation.CreateListAssociation(workflowTemplate, - definition.Name, - list.ParentWeb.Lists[definition.TaskListTitle], - list.ParentWeb.Lists[definition.HistoryListTitle]); - - isNew = true; - } - - MapProperties(definition, existingWorkflowAssotiation); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioned, - Object = existingWorkflowAssotiation, - ObjectType = typeof(SPWorkflowAssociation), - ObjectDefinition = definition, - ModelHost = modelHost - }); - - if (isNew) - { - list.WorkflowAssociations.Add(existingWorkflowAssotiation); - } - else - { - // ?? - } - } - - private void MapProperties(WorkflowAssociationDefinition definition, SPWorkflowAssociation association) - { - if (!string.IsNullOrEmpty(definition.Description)) - association.Description = definition.Description; - - if (!string.IsNullOrEmpty(definition.AssociationData)) - association.AssociationData = definition.AssociationData; - - if (definition.AllowManual.HasValue) - association.AllowManual = definition.AllowManual.Value; - - if (definition.AutoStartChange.HasValue) - association.AutoStartChange = definition.AutoStartChange.Value; - - if (definition.AutoStartCreate.HasValue) - association.AutoStartCreate = definition.AutoStartCreate.Value; - - if (definition.Enabled.HasValue) - association.Enabled = definition.Enabled.Value; - } - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using Microsoft.SharePoint.Workflow; +using SPMeta2.Definitions; +using SPMeta2.Exceptions; +using SPMeta2.SSOM.ModelHosts; +using SPMeta2.Utils; +using Microsoft.SharePoint; +using SPMeta2.Common; +using SPMeta2.Enumerations; + +namespace SPMeta2.SSOM.ModelHandlers +{ + public class WorkflowAssociationModelHandler : SSOMModelHandlerBase + { + #region propeties + public override Type TargetType + { + get { return typeof(WorkflowAssociationDefinition); } + } + #endregion + + #region methods + + public override void DeployModel(object modelHost, DefinitionBase model) + { + var workflowAssociationModel = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + if (modelHost is ListModelHost) + { + var listModelHost = (modelHost as ListModelHost); + var list = listModelHost.HostList; + + DeployListWorkflowAssociationDefinition(listModelHost, list, workflowAssociationModel); + } + else if (modelHost is WebModelHost) + { + var webModelHost = (modelHost as WebModelHost); + var web = webModelHost.HostWeb; + + DeployWebWorkflowAssociationDefinition(webModelHost, web, workflowAssociationModel); + } + else if (modelHost is SPContentType) + { + var contentType = (modelHost as SPContentType); + + DeployContentTypeWorkflowAssociationDefinition(contentType, contentType, workflowAssociationModel); + } + + else + { + throw new SPMeta2NotSupportedException("model host should be of type ListModelHost or WebModelHost"); + } + } + + + + private SPWeb GetWebFromModelHost(object modelHost) + { + if (modelHost is ListModelHost) + { + return (modelHost as ListModelHost).HostList.ParentWeb; + } + + if (modelHost is WebModelHost) + { + return (modelHost as WebModelHost).HostWeb; + } + + + if (modelHost is SPContentType) + { + return (modelHost as SPContentType).ParentWeb; + } + + throw new SPMeta2NotSupportedException("model host should be of type ListModelHost or WebModelHost"); + } + + protected SPWorkflowAssociation FindExistringWorkflowAssotiation(object modelHost, WorkflowAssociationDefinition def) + { + if (modelHost is ListModelHost) + { + var list = (modelHost as ListModelHost).HostList; + + return list.WorkflowAssociations + .GetAssociationByName(def.Name, list.ParentWeb.UICulture); + } + if (modelHost is WebModelHost) + { + var web = (modelHost as WebModelHost).HostWeb; + + return web.WorkflowAssociations + .GetAssociationByName(def.Name, web.UICulture); + } + if (modelHost is SPContentType) + { + var contentType = (modelHost as SPContentType); + var web = contentType.ParentWeb; + + return contentType.WorkflowAssociations + .GetAssociationByName(def.Name, web.UICulture); + } + else + { + throw new SPMeta2NotImplementedException( + string.Format("Unsupported model host: WorkflowAssociation under {0} is not implemented yet", + modelHost.GetType())); + } + } + + private SPWorkflowTemplate GetWorkflowTemplate(object modelHost, WorkflowAssociationDefinition def) + { + var targetWeb = GetWebFromModelHost(modelHost); + return targetWeb.WorkflowTemplates.GetTemplateByName(def.WorkflowTemplateName, targetWeb.UICulture); + } + + private void DeployContentTypeWorkflowAssociationDefinition(SPContentType modelHost, SPContentType contentType, WorkflowAssociationDefinition definition) + { + var existingWorkflowAssotiation = FindExistringWorkflowAssotiation(modelHost, definition); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = existingWorkflowAssotiation, + ObjectType = typeof(SPWorkflowAssociation), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + bool isNew = false; + + if (existingWorkflowAssotiation == null) + { + var workflowTemplate = GetWorkflowTemplate(modelHost, definition); + + if (workflowTemplate == null) + { + throw new SPMeta2Exception( + string.Format("Cannot find workflow template by definition:[{0}]", definition)); + } + + existingWorkflowAssotiation = SPWorkflowAssociation.CreateWebContentTypeAssociation(workflowTemplate, + definition.Name, + definition.TaskListTitle, + definition.HistoryListTitle); + + isNew = true; + } + + MapProperties(definition, existingWorkflowAssotiation); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = existingWorkflowAssotiation, + ObjectType = typeof(SPWorkflowAssociation), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + if (isNew) + { + contentType.WorkflowAssociations.Add(existingWorkflowAssotiation); + contentType.UpdateWorkflowAssociationsOnChildren(false, + true, + true, + false); + } + else + { + // TODO, what's the logic for update? + // what to update at all? + } + } + + private void DeployWebWorkflowAssociationDefinition(WebModelHost modelHost, Microsoft.SharePoint.SPWeb web, WorkflowAssociationDefinition definition) + { + var existingWorkflowAssotiation = FindExistringWorkflowAssotiation(modelHost, definition); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = existingWorkflowAssotiation, + ObjectType = typeof(SPWorkflowAssociation), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + bool isNew = false; + + if (existingWorkflowAssotiation == null) + { + var workflowTemplate = GetWorkflowTemplate(modelHost, definition); + + if (workflowTemplate == null) + { + throw new SPMeta2Exception( + string.Format("Cannot find workflow template by definition:[{0}]", definition)); + } + + existingWorkflowAssotiation = SPWorkflowAssociation.CreateListAssociation(workflowTemplate, + definition.Name, + web.Lists[definition.TaskListTitle], + web.Lists[definition.HistoryListTitle]); + + isNew = true; + } + + MapProperties(definition, existingWorkflowAssotiation); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = existingWorkflowAssotiation, + ObjectType = typeof(SPWorkflowAssociation), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + if (isNew) + { + web.WorkflowAssociations.Add(existingWorkflowAssotiation); + web.Update(); + } + else + { + // TODO, what's the logic for update? + // what to update at all? + } + } + + private void DeployListWorkflowAssociationDefinition(ListModelHost modelHost, SPList list, WorkflowAssociationDefinition definition) + { + var existingWorkflowAssotiation = FindExistringWorkflowAssotiation(modelHost, definition); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = existingWorkflowAssotiation, + ObjectType = typeof(SPWorkflowAssociation), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + bool isNew = false; + + if (existingWorkflowAssotiation == null) + { + var workflowTemplate = GetWorkflowTemplate(modelHost, definition); + + if (workflowTemplate == null) + { + throw new SPMeta2Exception( + string.Format("Cannot find workflow template by definition:[{0}]", definition)); + } + + existingWorkflowAssotiation = SPWorkflowAssociation.CreateListAssociation(workflowTemplate, + definition.Name, + list.ParentWeb.Lists[definition.TaskListTitle], + list.ParentWeb.Lists[definition.HistoryListTitle]); + + isNew = true; + } + + MapProperties(definition, existingWorkflowAssotiation); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = existingWorkflowAssotiation, + ObjectType = typeof(SPWorkflowAssociation), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + if (isNew) + { + list.WorkflowAssociations.Add(existingWorkflowAssotiation); + list.Update(); + } + else + { + // ?? + } + } + + private void MapProperties(WorkflowAssociationDefinition definition, SPWorkflowAssociation association) + { + if (!string.IsNullOrEmpty(definition.Description)) + association.Description = definition.Description; + + if (!string.IsNullOrEmpty(definition.AssociationData)) + association.AssociationData = definition.AssociationData; + + if (definition.AllowManual.HasValue) + association.AllowManual = definition.AllowManual.Value; + + if (definition.AutoStartChange.HasValue) + association.AutoStartChange = definition.AutoStartChange.Value; + + if (definition.AutoStartCreate.HasValue) + association.AutoStartCreate = definition.AutoStartCreate.Value; + + if (definition.Enabled.HasValue) + association.Enabled = definition.Enabled.Value; + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/Common/DefaultModelWeigh.cs b/SPMeta2/SPMeta2/Common/DefaultModelWeigh.cs index aaec21788..fc40cfdb3 100644 --- a/SPMeta2/SPMeta2/Common/DefaultModelWeigh.cs +++ b/SPMeta2/SPMeta2/Common/DefaultModelWeigh.cs @@ -166,6 +166,7 @@ private static void InitWebScope() // goes after list definitions to make sure you get history/task lists typeof (SP2013WorkflowSubscriptionDefinition), + typeof (WorkflowAssociationDefinition), typeof (MasterPageSettingsDefinition), typeof (WelcomePageDefinition) diff --git a/SPMeta2/SPMeta2/Syntax/Default/ContentTypeDefinitionSyntax.cs b/SPMeta2/SPMeta2/Syntax/Default/ContentTypeDefinitionSyntax.cs index 7b12933b3..dc22e4c0c 100644 --- a/SPMeta2/SPMeta2/Syntax/Default/ContentTypeDefinitionSyntax.cs +++ b/SPMeta2/SPMeta2/Syntax/Default/ContentTypeDefinitionSyntax.cs @@ -12,7 +12,8 @@ namespace SPMeta2.Syntax.Default public class ContentTypeModelNode : TypedModelNode, IContentTypeModelNode, IEventReceiverHostModelNode, IModuleFileHostModelNode, - IContentTypeFieldLinkHostModelNode + IContentTypeFieldLinkHostModelNode, + IWorkflowAssociationHostModelNode { } From e55b3691053e0bd7a15e734c0314149a69342a66 Mon Sep 17 00:00:00 2001 From: "support@subpointsolutions.com" Date: Thu, 11 Aug 2016 06:57:59 -0700 Subject: [PATCH 07/12] + Enhance WorkflowAssociationDefinition - support deployment under content type #867 + CSOM impl + passed the following tests: * CanDeploy_WorkflowAssociation_UnderWeb * CanDeploy_WorkflowAssociation_UnderList * CanDeploy_WorkflowAssociation_UnderContentType --- .../WorkflowAssociationModelHandler.cs | 613 ++++++++++++------ ...tWorkflowAssociationDefinitionValidator.cs | 194 +++--- .../WorkflowAssociationScenariosTest.cs | 12 +- .../WorkflowAssociationDefinition.cs | 195 +++--- 4 files changed, 608 insertions(+), 406 deletions(-) diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/WorkflowAssociationModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/WorkflowAssociationModelHandler.cs index 8aaffb89d..292942020 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/WorkflowAssociationModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/WorkflowAssociationModelHandler.cs @@ -1,215 +1,398 @@ -using System; -using System.Data; -using System.Linq; -using Microsoft.SharePoint.Client; -using Microsoft.SharePoint.Client.Workflow; -using SPMeta2.Common; -using SPMeta2.CSOM.Extensions; -using SPMeta2.Definitions; -using SPMeta2.Definitions.Base; -using SPMeta2.Enumerations; -using SPMeta2.ModelHandlers; -using SPMeta2.ModelHosts; -using SPMeta2.Services; -using SPMeta2.Utils; -using SPMeta2.CSOM.ModelHosts; -using SPMeta2.Exceptions; - -namespace SPMeta2.CSOM.ModelHandlers -{ - public class WorkflowAssociationModelHandler : CSOMModelHandlerBase - { - #region propeties - public override Type TargetType - { - get { return typeof(WorkflowAssociationDefinition); } - } - #endregion - - #region methods - - public override void DeployModel(object modelHost, DefinitionBase model) - { - var workflowAssociationModel = model.WithAssertAndCast("model", value => value.RequireNotNull()); - - if (modelHost is ListModelHost) - { - var listModelHost = (modelHost as ListModelHost); - var list = listModelHost.HostList; - - DeployListWorkflowAssociationDefinition(listModelHost, list, workflowAssociationModel); - } - else if (modelHost is WebModelHost) - { - var webModelHost = (modelHost as WebModelHost); - var web = webModelHost.HostWeb; - - DeployWebWorkflowAssociationDefinition(webModelHost, web, workflowAssociationModel); - } - else - { - throw new SPMeta2NotSupportedException("model host should be of type ListModelHost or WebModelHost"); - } - } - - private Web GetWebFromModelHost(object modelHost) - { - if (modelHost is ListModelHost) - { - return (modelHost as ListModelHost).HostList.ParentWeb; - } - - if (modelHost is WebModelHost) - { - return (modelHost as WebModelHost).HostWeb; - } - - - throw new SPMeta2NotSupportedException("model host should be of type ListModelHost or WebModelHost"); - - } - - protected WorkflowAssociation FindExistringWorkflowAssotiation(object modelHost, WorkflowAssociationDefinition def) - { - if (modelHost is ListModelHost) - { - var list = (modelHost as ListModelHost).HostList; - var context = list.Context; - - var defName = def.Name; - - var res = context.LoadQuery(list.WorkflowAssociations.Where(w => w.Name == defName)); - context.ExecuteQueryWithTrace(); - - return res.FirstOrDefault(); - } - - if (modelHost is WebModelHost) - { - throw new SPMeta2NotImplementedException("WorkflowAssociation under web is not implemented yet"); - } - - - throw new SPMeta2NotSupportedException("model host should be of type ListModelHost or WebModelHost"); - } - - private WorkflowTemplate GetWorkflowTemplate(object modelHost, WorkflowAssociationDefinition def) - { - var targetWeb = GetWebFromModelHost(modelHost); - var context = targetWeb.Context; - - var result = targetWeb.WorkflowTemplates.GetByName(def.WorkflowTemplateName); - - context.Load(result); - context.ExecuteQueryWithTrace(); - - return result; - } - - private void DeployWebWorkflowAssociationDefinition(WebModelHost webModelHost, Web web, WorkflowAssociationDefinition workflowAssociationModel) - { - // TODO - } - - private void DeployListWorkflowAssociationDefinition(ListModelHost modelHost, List list, WorkflowAssociationDefinition definition) - { - var context = list.Context; - var existingWorkflowAssotiation = FindExistringWorkflowAssotiation(modelHost, definition); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioning, - Object = existingWorkflowAssotiation, - ObjectType = typeof(WorkflowAssociation), - ObjectDefinition = definition, - ModelHost = modelHost - }); - - if (existingWorkflowAssotiation == null - || - (existingWorkflowAssotiation.ServerObjectIsNull.HasValue && - existingWorkflowAssotiation.ServerObjectIsNull.Value)) - { - var workflowTemplate = GetWorkflowTemplate(modelHost, definition); - - if (workflowTemplate == null || - (workflowTemplate.ServerObjectIsNull.HasValue && workflowTemplate.ServerObjectIsNull.Value)) - { - throw new SPMeta2Exception( - string.Format("Cannot find workflow template by definition:[{0}]", definition)); - } - - var historyList = list.ParentWeb.QueryAndGetListByTitle(definition.HistoryListTitle); - var taskList = list.ParentWeb.QueryAndGetListByTitle(definition.TaskListTitle); - - var newWorkflowAssotiation = list.WorkflowAssociations.Add(new WorkflowAssociationCreationInformation - { - Name = definition.Name, - Template = workflowTemplate, - HistoryList = historyList, - TaskList = taskList - }); - - MapProperties(definition, newWorkflowAssotiation); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioned, - Object = newWorkflowAssotiation, - ObjectType = typeof(WorkflowAssociation), - ObjectDefinition = definition, - ModelHost = modelHost - }); - - newWorkflowAssotiation.Update(); - - context.ExecuteQueryWithTrace(); - } - else - { - MapProperties(definition, existingWorkflowAssotiation); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioned, - Object = existingWorkflowAssotiation, - ObjectType = typeof(WorkflowAssociation), - ObjectDefinition = definition, - ModelHost = modelHost - }); - - existingWorkflowAssotiation.Update(); - context.ExecuteQueryWithTrace(); - } - } - - private void MapProperties(WorkflowAssociationDefinition definition, WorkflowAssociation association) - { - if (!string.IsNullOrEmpty(definition.Description)) - association.Description = definition.Description; - - if (!string.IsNullOrEmpty(definition.AssociationData)) - association.AssociationData = definition.AssociationData; - - if (definition.AllowManual.HasValue) - association.AllowManual = definition.AllowManual.Value; - - if (definition.AutoStartChange.HasValue) - association.AutoStartChange = definition.AutoStartChange.Value; - - if (definition.AutoStartCreate.HasValue) - association.AutoStartCreate = definition.AutoStartCreate.Value; - - if (definition.Enabled.HasValue) - association.Enabled = definition.Enabled.Value; - } - - #endregion - } -} +using System; +using System.Data; +using System.Linq; +using Microsoft.SharePoint.Client; +using Microsoft.SharePoint.Client.Workflow; +using SPMeta2.Common; +using SPMeta2.CSOM.Common; +using SPMeta2.CSOM.Extensions; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; +using SPMeta2.Enumerations; +using SPMeta2.ModelHandlers; +using SPMeta2.ModelHosts; +using SPMeta2.Services; +using SPMeta2.Utils; +using SPMeta2.CSOM.ModelHosts; +using SPMeta2.Exceptions; + +namespace SPMeta2.CSOM.ModelHandlers +{ + public class WorkflowAssociationModelHandler : CSOMModelHandlerBase + { + #region propeties + public override Type TargetType + { + get { return typeof(WorkflowAssociationDefinition); } + } + #endregion + + #region methods + + public override void DeployModel(object modelHost, DefinitionBase model) + { + var workflowAssociationModel = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + if (modelHost is ListModelHost) + { + var listModelHost = (modelHost as ListModelHost); + var list = listModelHost.HostList; + + DeployListWorkflowAssociationDefinition(listModelHost, list, workflowAssociationModel); + } + else if (modelHost is WebModelHost) + { + var webModelHost = (modelHost as WebModelHost); + var web = webModelHost.HostWeb; + + DeployWebWorkflowAssociationDefinition(webModelHost, web, workflowAssociationModel); + } + else if (modelHost is ModelHostContext) + { + var contentType = (modelHost as ModelHostContext).ContentType; + + DeployContentTypeWorkflowAssociationDefinition(modelHost, contentType, workflowAssociationModel); + } + else + { + throw new SPMeta2NotSupportedException("model host should be of type ListModelHost or WebModelHost"); + } + } + + + private Web GetWebFromModelHost(object modelHost) + { + if (modelHost is ListModelHost) + { + return (modelHost as ListModelHost).HostList.ParentWeb; + } + + if (modelHost is WebModelHost) + { + return (modelHost as WebModelHost).HostWeb; + } + + if (modelHost is ModelHostContext) + { + return (modelHost as ModelHostContext).Web; + } + + throw new SPMeta2NotSupportedException("model host should be of type ListModelHost or WebModelHost"); + } + + protected WorkflowAssociation FindExistringWorkflowAssotiation(object modelHost, WorkflowAssociationDefinition def) + { + if (modelHost is ListModelHost) + { + var list = (modelHost as ListModelHost).HostList; + var context = list.Context; + + var defName = def.Name; + + var res = context.LoadQuery(list.WorkflowAssociations.Where(w => w.Name == defName)); + context.ExecuteQueryWithTrace(); + + return res.FirstOrDefault(); + } + + if (modelHost is WebModelHost) + { + var web = (modelHost as WebModelHost).HostWeb; + var context = web.Context; + + var defName = def.Name; + + var res = context.LoadQuery(web.WorkflowAssociations.Where(w => w.Name == defName)); + context.ExecuteQueryWithTrace(); + + return res.FirstOrDefault(); + } + + if (modelHost is ModelHostContext) + { + var contentType = (modelHost as ModelHostContext).ContentType; + var context = contentType.Context; + + var defName = def.Name; + + var res = context.LoadQuery(contentType.WorkflowAssociations.Where(w => w.Name == defName)); + context.ExecuteQueryWithTrace(); + + return res.FirstOrDefault(); + } + + throw new SPMeta2NotSupportedException("model host should be of type ListModelHost or WebModelHost"); + } + + private WorkflowTemplate GetWorkflowTemplate(object modelHost, WorkflowAssociationDefinition def) + { + var targetWeb = GetWebFromModelHost(modelHost); + var context = targetWeb.Context; + + var result = targetWeb.WorkflowTemplates.GetByName(def.WorkflowTemplateName); + + context.Load(result); + context.ExecuteQueryWithTrace(); + + return result; + } + + private void DeployContentTypeWorkflowAssociationDefinition(object modelHost, ContentType contentType, WorkflowAssociationDefinition definition) + { + var context = contentType.Context; + var web = (modelHost as ModelHostContext).Web; + + var existingWorkflowAssotiation = FindExistringWorkflowAssotiation(modelHost, definition); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = existingWorkflowAssotiation, + ObjectType = typeof(WorkflowAssociation), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + if (existingWorkflowAssotiation == null + || + (existingWorkflowAssotiation.ServerObjectIsNull.HasValue && + existingWorkflowAssotiation.ServerObjectIsNull.Value)) + { + var workflowTemplate = GetWorkflowTemplate(modelHost, definition); + + if (workflowTemplate == null || + (workflowTemplate.ServerObjectIsNull.HasValue && workflowTemplate.ServerObjectIsNull.Value)) + { + throw new SPMeta2Exception( + string.Format("Cannot find workflow template by definition:[{0}]", definition)); + } + + var historyList = web.QueryAndGetListByTitle(definition.HistoryListTitle); + var taskList = web.QueryAndGetListByTitle(definition.TaskListTitle); + + var newWorkflowAssotiation = contentType.WorkflowAssociations.Add(new WorkflowAssociationCreationInformation + { + Name = definition.Name, + Template = workflowTemplate, + HistoryList = historyList, + TaskList = taskList + }); + + MapProperties(definition, newWorkflowAssotiation); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = newWorkflowAssotiation, + ObjectType = typeof(WorkflowAssociation), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + contentType.Update(true); + context.ExecuteQueryWithTrace(); + } + else + { + MapProperties(definition, existingWorkflowAssotiation); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = existingWorkflowAssotiation, + ObjectType = typeof(WorkflowAssociation), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + contentType.Update(true); + context.ExecuteQueryWithTrace(); + } + } + + + private void DeployWebWorkflowAssociationDefinition(WebModelHost modelHost, Web web, WorkflowAssociationDefinition definition) + { + var context = web.Context; + var existingWorkflowAssotiation = FindExistringWorkflowAssotiation(modelHost, definition); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = existingWorkflowAssotiation, + ObjectType = typeof(WorkflowAssociation), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + if (existingWorkflowAssotiation == null + || + (existingWorkflowAssotiation.ServerObjectIsNull.HasValue && + existingWorkflowAssotiation.ServerObjectIsNull.Value)) + { + var workflowTemplate = GetWorkflowTemplate(modelHost, definition); + + if (workflowTemplate == null || + (workflowTemplate.ServerObjectIsNull.HasValue && workflowTemplate.ServerObjectIsNull.Value)) + { + throw new SPMeta2Exception( + string.Format("Cannot find workflow template by definition:[{0}]", definition)); + } + + var historyList = web.QueryAndGetListByTitle(definition.HistoryListTitle); + var taskList = web.QueryAndGetListByTitle(definition.TaskListTitle); + + var newWorkflowAssotiation = web.WorkflowAssociations.Add(new WorkflowAssociationCreationInformation + { + Name = definition.Name, + Template = workflowTemplate, + HistoryList = historyList, + TaskList = taskList + }); + + MapProperties(definition, newWorkflowAssotiation); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = newWorkflowAssotiation, + ObjectType = typeof(WorkflowAssociation), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + web.Update(); + context.ExecuteQueryWithTrace(); + } + else + { + MapProperties(definition, existingWorkflowAssotiation); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = existingWorkflowAssotiation, + ObjectType = typeof(WorkflowAssociation), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + web.Update(); + context.ExecuteQueryWithTrace(); + } + } + + private void DeployListWorkflowAssociationDefinition(ListModelHost modelHost, List list, WorkflowAssociationDefinition definition) + { + var context = list.Context; + var existingWorkflowAssotiation = FindExistringWorkflowAssotiation(modelHost, definition); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = existingWorkflowAssotiation, + ObjectType = typeof(WorkflowAssociation), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + if (existingWorkflowAssotiation == null + || + (existingWorkflowAssotiation.ServerObjectIsNull.HasValue && + existingWorkflowAssotiation.ServerObjectIsNull.Value)) + { + var workflowTemplate = GetWorkflowTemplate(modelHost, definition); + + if (workflowTemplate == null || + (workflowTemplate.ServerObjectIsNull.HasValue && workflowTemplate.ServerObjectIsNull.Value)) + { + throw new SPMeta2Exception( + string.Format("Cannot find workflow template by definition:[{0}]", definition)); + } + + var historyList = list.ParentWeb.QueryAndGetListByTitle(definition.HistoryListTitle); + var taskList = list.ParentWeb.QueryAndGetListByTitle(definition.TaskListTitle); + + var newWorkflowAssotiation = list.WorkflowAssociations.Add(new WorkflowAssociationCreationInformation + { + Name = definition.Name, + Template = workflowTemplate, + HistoryList = historyList, + TaskList = taskList + }); + + MapProperties(definition, newWorkflowAssotiation); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = newWorkflowAssotiation, + ObjectType = typeof(WorkflowAssociation), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + newWorkflowAssotiation.Update(); + + context.ExecuteQueryWithTrace(); + } + else + { + MapProperties(definition, existingWorkflowAssotiation); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = existingWorkflowAssotiation, + ObjectType = typeof(WorkflowAssociation), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + existingWorkflowAssotiation.Update(); + context.ExecuteQueryWithTrace(); + } + } + + private void MapProperties(WorkflowAssociationDefinition definition, WorkflowAssociation association) + { + if (!string.IsNullOrEmpty(definition.Description)) + association.Description = definition.Description; + + if (!string.IsNullOrEmpty(definition.AssociationData)) + association.AssociationData = definition.AssociationData; + + if (definition.AllowManual.HasValue) + association.AllowManual = definition.AllowManual.Value; + + if (definition.AutoStartChange.HasValue) + association.AutoStartChange = definition.AutoStartChange.Value; + + if (definition.AutoStartCreate.HasValue) + association.AutoStartCreate = definition.AutoStartCreate.Value; + + if (definition.Enabled.HasValue) + association.Enabled = definition.Enabled.Value; + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientWorkflowAssociationDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientWorkflowAssociationDefinitionValidator.cs index 1bb6585c0..2a9ae9af3 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientWorkflowAssociationDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientWorkflowAssociationDefinitionValidator.cs @@ -1,92 +1,102 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using SPMeta2.Containers.Assertion; -using SPMeta2.CSOM.ModelHandlers; -using SPMeta2.Definitions; -using SPMeta2.Regression.CSOM; -using SPMeta2.Utils; - -namespace SPMeta2.Regression.SSOM.Validation -{ - public class ClientWorkflowAssociationDefinitionValidator : WorkflowAssociationModelHandler - { - public override void DeployModel(object modelHost, DefinitionBase model) - { - var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); - var spObject = FindExistringWorkflowAssotiation(modelHost, definition); - - - var assert = ServiceFactory.AssertService.NewAssert(definition, spObject); - - assert - .ShouldNotBeNull(spObject) - .ShouldBeEqual(m => m.Name, o => o.Name); - - if (!string.IsNullOrEmpty(definition.WorkflowTemplateName)) - { - assert.SkipProperty(m => m.WorkflowTemplateName, "Cant validate. Property is unsupported by CSOM API."); - - //assert.ShouldBeEqual((p, s, d) => - //{ - // var srcProp = s.GetExpressionValue(m => m.WorkflowTemplateName); - // var isValid = s.WorkflowTemplateName == d..Name; - - // return new PropertyValidationResult - // { - // Tag = p.Tag, - // Src = srcProp, - // Dst = null, - // IsValid = isValid - // }; - //}); - } - else - { - assert.SkipProperty(m => m.WorkflowTemplateName, "Cant validate. Property is unsupported by CSOM API."); - } - - if (!string.IsNullOrEmpty(definition.Description)) - assert.ShouldBeEqual(m => m.Description, o => o.Description); - else - assert.SkipProperty(m => m.Description); - - if (!string.IsNullOrEmpty(definition.AssociationData)) - assert.ShouldBeEqual(m => m.AssociationData, o => o.AssociationData); - else - assert.SkipProperty(m => m.AssociationData); - - if (definition.Enabled.HasValue) - assert.ShouldBeEqual(m => m.Enabled, o => o.Enabled); - else - assert.SkipProperty(m => m.Enabled); - - if (definition.AllowManual.HasValue) - assert.ShouldBeEqual(m => m.AllowManual, o => o.AllowManual); - else - assert.SkipProperty(m => m.AllowManual); - - if (definition.AutoStartChange.HasValue) - assert.ShouldBeEqual(m => m.AutoStartChange, o => o.AutoStartChange); - else - assert.SkipProperty(m => m.AutoStartChange); - - if (definition.AutoStartCreate.HasValue) - assert.ShouldBeEqual(m => m.AutoStartCreate, o => o.AutoStartCreate); - else - assert.SkipProperty(m => m.AutoStartCreate); - - if (!string.IsNullOrEmpty(definition.TaskListTitle)) - assert.ShouldBeEqual(m => m.TaskListTitle, o => o.TaskListTitle); - else - assert.SkipProperty(m => m.TaskListTitle); - - if (!string.IsNullOrEmpty(definition.HistoryListTitle)) - assert.ShouldBeEqual(m => m.HistoryListTitle, o => o.HistoryListTitle); - else - assert.SkipProperty(m => m.HistoryListTitle); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using SPMeta2.Containers.Assertion; +using SPMeta2.CSOM.Common; +using SPMeta2.CSOM.ModelHandlers; +using SPMeta2.Definitions; +using SPMeta2.Regression.CSOM; +using SPMeta2.Utils; +using SPMeta2.CSOM.ModelHosts; + +namespace SPMeta2.Regression.SSOM.Validation +{ + public class ClientWorkflowAssociationDefinitionValidator : WorkflowAssociationModelHandler + { + public override void DeployModel(object modelHost, DefinitionBase model) + { + var definition = model.WithAssertAndCast("model", value => value.RequireNotNull()); + var spObject = FindExistringWorkflowAssotiation(modelHost, definition); + + + var assert = ServiceFactory.AssertService.NewAssert(definition, spObject); + + assert + .ShouldNotBeNull(spObject) + .ShouldBeEqual(m => m.Name, o => o.Name); + + if (!string.IsNullOrEmpty(definition.WorkflowTemplateName)) + { + assert.SkipProperty(m => m.WorkflowTemplateName, "Cant validate. Property is unsupported by CSOM API."); + + //assert.ShouldBeEqual((p, s, d) => + //{ + // var srcProp = s.GetExpressionValue(m => m.WorkflowTemplateName); + // var isValid = s.WorkflowTemplateName == d..Name; + + // return new PropertyValidationResult + // { + // Tag = p.Tag, + // Src = srcProp, + // Dst = null, + // IsValid = isValid + // }; + //}); + } + else + { + assert.SkipProperty(m => m.WorkflowTemplateName, "Cant validate. Property is unsupported by CSOM API."); + } + + if (modelHost is WebModelHost || + modelHost is ModelHostContext) + { + assert.SkipProperty(m => m.Description, "Skipping Description valiation. CSOM deployment under web/content type gives only the description of the worklow."); + } + else + { + if (!string.IsNullOrEmpty(definition.Description)) + assert.ShouldBeEqual(m => m.Description, o => o.Description); + else + assert.SkipProperty(m => m.Description); + } + + if (!string.IsNullOrEmpty(definition.AssociationData)) + assert.ShouldBeEqual(m => m.AssociationData, o => o.AssociationData); + else + assert.SkipProperty(m => m.AssociationData); + + if (definition.Enabled.HasValue) + assert.ShouldBeEqual(m => m.Enabled, o => o.Enabled); + else + assert.SkipProperty(m => m.Enabled); + + if (definition.AllowManual.HasValue) + assert.ShouldBeEqual(m => m.AllowManual, o => o.AllowManual); + else + assert.SkipProperty(m => m.AllowManual); + + if (definition.AutoStartChange.HasValue) + assert.ShouldBeEqual(m => m.AutoStartChange, o => o.AutoStartChange); + else + assert.SkipProperty(m => m.AutoStartChange); + + if (definition.AutoStartCreate.HasValue) + assert.ShouldBeEqual(m => m.AutoStartCreate, o => o.AutoStartCreate); + else + assert.SkipProperty(m => m.AutoStartCreate); + + if (!string.IsNullOrEmpty(definition.TaskListTitle)) + assert.ShouldBeEqual(m => m.TaskListTitle, o => o.TaskListTitle); + else + assert.SkipProperty(m => m.TaskListTitle); + + if (!string.IsNullOrEmpty(definition.HistoryListTitle)) + assert.ShouldBeEqual(m => m.HistoryListTitle, o => o.HistoryListTitle); + else + assert.SkipProperty(m => m.HistoryListTitle); + } + } +} diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs index 9f4855216..996ee1949 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs @@ -156,7 +156,15 @@ public void CanDeploy_WorkflowAssociation_UnderContentType() def.HistoryListTitle = historyList.Title; }); - var model = SPMeta2Model.NewSiteModel(site => + // 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.AddRandomContentType(contentType => { @@ -164,7 +172,7 @@ public void CanDeploy_WorkflowAssociation_UnderContentType() }); }); - TestModel(model); + TestModel(webModel, siteModel); } } } diff --git a/SPMeta2/SPMeta2/Definitions/WorkflowAssociationDefinition.cs b/SPMeta2/SPMeta2/Definitions/WorkflowAssociationDefinition.cs index 4c139869d..b77fd23e4 100644 --- a/SPMeta2/SPMeta2/Definitions/WorkflowAssociationDefinition.cs +++ b/SPMeta2/SPMeta2/Definitions/WorkflowAssociationDefinition.cs @@ -1,97 +1,98 @@ -using SPMeta2.Attributes; -using SPMeta2.Attributes.Regression; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; - -using SPMeta2.Attributes.Capabilities; -using SPMeta2.Attributes.Identity; -using SPMeta2.Utils; - -namespace SPMeta2.Definitions -{ - [SPObjectType(SPObjectModelType.SSOM, "Microsoft.SharePoint.Workflow.SPWorkflowAssociation", "Microsoft.SharePoint")] - [SPObjectType(SPObjectModelType.CSOM, "Microsoft.SharePoint.Client.Workflow.WorkflowAssociation", "Microsoft.SharePoint.Client")] - - [DefaultRootHost(typeof(SiteDefinition))] - [DefaultParentHost(typeof(ListDefinition))] - - [Serializable] - [DataContract] - [ExpectWithExtensionMethod] - [ExpectArrayExtensionMethod] - - - //[ParentHostCapability(typeof(SiteDefinition))] - //[ParentHostCapability(typeof(WebDefinition))] - [ParentHostCapability(typeof(ListDefinition))] - - [ExpectManyInstances] - public class WorkflowAssociationDefinition : DefinitionBase - { - #region properties - - [DataMember] - [IdentityKey] - [ExpectRequired] - [ExpectValidation] - public string Name { get; set; } - - [DataMember] - [ExpectValidation] - public string Description { get; set; } - - [DataMember] - [ExpectValidation] - public bool? Enabled { get; set; } - - [DataMember] - [ExpectValidation] - [ExpectRequired] - public string HistoryListTitle { get; set; } - - [DataMember] - [ExpectValidation] - [ExpectRequired] - public string TaskListTitle { get; set; } - - [DataMember] - [ExpectValidation] - public bool? AllowManual { get; set; } - - [DataMember] - [ExpectValidation] - public string AssociationData { get; set; } - - [DataMember] - [ExpectValidation] - public bool? AutoStartChange { get; set; } - - [DataMember] - [ExpectValidation] - public bool? AutoStartCreate { get; set; } - - [DataMember] - [ExpectValidation] - [ExpectRequired] - public string WorkflowTemplateName { get; set; } - - #endregion - - #region methods - - public override string ToString() - { - return new ToStringResult(this) - .AddPropertyValue(p => p.Name) - .AddPropertyValue(p => p.WorkflowTemplateName) - .AddPropertyValue(p => p.TaskListTitle) - .AddPropertyValue(p => p.HistoryListTitle) - .ToString(); - } - - #endregion - } -} +using SPMeta2.Attributes; +using SPMeta2.Attributes.Regression; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; + +using SPMeta2.Attributes.Capabilities; +using SPMeta2.Attributes.Identity; +using SPMeta2.Utils; + +namespace SPMeta2.Definitions +{ + [SPObjectType(SPObjectModelType.SSOM, "Microsoft.SharePoint.Workflow.SPWorkflowAssociation", "Microsoft.SharePoint")] + [SPObjectType(SPObjectModelType.CSOM, "Microsoft.SharePoint.Client.Workflow.WorkflowAssociation", "Microsoft.SharePoint.Client")] + + [DefaultRootHost(typeof(SiteDefinition))] + [DefaultParentHost(typeof(ListDefinition))] + + [Serializable] + [DataContract] + [ExpectWithExtensionMethod] + [ExpectArrayExtensionMethod] + + + //[ParentHostCapability(typeof(SiteDefinition))] + //[ParentHostCapability(typeof(WebDefinition))] + [ParentHostCapability(typeof(ListDefinition))] + + [ExpectManyInstances] + public class WorkflowAssociationDefinition : DefinitionBase + { + #region properties + + [DataMember] + [IdentityKey] + [ExpectRequired] + [ExpectValidation] + public string Name { get; set; } + + [DataMember] + [ExpectValidation] + + public string Description { get; set; } + + [DataMember] + [ExpectValidation] + public bool? Enabled { get; set; } + + [DataMember] + [ExpectValidation] + [ExpectRequired] + public string HistoryListTitle { get; set; } + + [DataMember] + [ExpectValidation] + [ExpectRequired] + public string TaskListTitle { get; set; } + + [DataMember] + [ExpectValidation] + public bool? AllowManual { get; set; } + + [DataMember] + [ExpectValidation] + public string AssociationData { get; set; } + + [DataMember] + [ExpectValidation] + public bool? AutoStartChange { get; set; } + + [DataMember] + [ExpectValidation] + public bool? AutoStartCreate { get; set; } + + [DataMember] + [ExpectValidation] + [ExpectRequired] + public string WorkflowTemplateName { get; set; } + + #endregion + + #region methods + + public override string ToString() + { + return new ToStringResult(this) + .AddPropertyValue(p => p.Name) + .AddPropertyValue(p => p.WorkflowTemplateName) + .AddPropertyValue(p => p.TaskListTitle) + .AddPropertyValue(p => p.HistoryListTitle) + .ToString(); + } + + #endregion + } +} From bed5de0744c0bde0b7a0377945fc7a1b9e2a2063 Mon Sep 17 00:00:00 2001 From: "support@subpointsolutions.com" Date: Fri, 12 Aug 2016 03:31:44 -0700 Subject: [PATCH 08/12] + Update comments on MajorVersionLimit / MajorWithMinorVersionsLimit support for ListDefinition #872 --- SPMeta2/SPMeta2/Definitions/ListDefinition.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPMeta2/SPMeta2/Definitions/ListDefinition.cs b/SPMeta2/SPMeta2/Definitions/ListDefinition.cs index 38ad6f60e..42766c296 100644 --- a/SPMeta2/SPMeta2/Definitions/ListDefinition.cs +++ b/SPMeta2/SPMeta2/Definitions/ListDefinition.cs @@ -219,7 +219,7 @@ public ListDefinition() /// /// The maximum number of major versions allowed for an item in a document library that uses version control with major versions only. - /// CSOM is not supported yet as M2 s build with SP2013 SP1+ assemblies. + /// M2 provisions that property if only current CSOM runtime provide support for that property. /// https://officespdev.uservoice.com/forums/224641-general/suggestions/6016131-majorversionlimit-majorwithminorversionslimit-pr /// [DataMember] @@ -228,7 +228,7 @@ public ListDefinition() /// /// The maximum number of major versions that are allowed for an item in a document library that uses version control with both major and minor versions. - /// CSOM is not supported yet as M2 s build with SP2013 SP1+ assemblies. + /// M2 provisions that property if only current CSOM runtime provide support for that property. /// https://officespdev.uservoice.com/forums/224641-general/suggestions/6016131-majorversionlimit-majorwithminorversionslimit-pr /// [DataMember] From 3b267b7cd8cfe84457afed140b81114060b28532 Mon Sep 17 00:00:00 2001 From: "support@subpointsolutions.com" Date: Fri, 12 Aug 2016 04:44:06 -0700 Subject: [PATCH 09/12] + Enhance WorkflowAssociationDefinition - add more tests on updatability #871 + SSOM implementation --- .../WorkflowAssociationScenariosTest.cs | 36 +++++++++++++++++++ .../WorkflowAssociationModelHandler.cs | 12 ++++--- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs index 996ee1949..e4bc9b6d0 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs @@ -84,12 +84,24 @@ public void CanDeploy_WorkflowAssociation_UnderWeb() def.HistoryListTitle = historyList.Title; }); + // changability + // deploy the same association with different props + var workflowDefChanges = workflowDef.Inherit(def => + { + def.AllowManual = !def.AllowManual; + def.AutoStartChange = !def.AutoStartChange; + def.AutoStartCreate = !def.AutoStartCreate; + + def.AssociationData = Rnd.String(); + }); + var model = SPMeta2Model.NewWebModel(web => { web.AddList(taskList); web.AddList(historyList); web.AddWorkflowAssociation(workflowDef); + web.AddWorkflowAssociation(workflowDefChanges); }); TestModel(model); @@ -117,6 +129,17 @@ public void CanDeploy_WorkflowAssociation_UnderList() def.HistoryListTitle = historyList.Title; }); + // changability + // deploy the same association with different props + var workflowDefChanges = workflowDef.Inherit(def => + { + def.AllowManual = !def.AllowManual; + def.AutoStartChange = !def.AutoStartChange; + def.AutoStartCreate = !def.AutoStartCreate; + + def.AssociationData = Rnd.String(); + }); + var model = SPMeta2Model.NewWebModel(web => { web.AddList(taskList); @@ -125,6 +148,7 @@ public void CanDeploy_WorkflowAssociation_UnderList() web.AddRandomList(list => { list.AddWorkflowAssociation(workflowDef); + list.AddWorkflowAssociation(workflowDefChanges); }); }); @@ -156,6 +180,17 @@ public void CanDeploy_WorkflowAssociation_UnderContentType() def.HistoryListTitle = historyList.Title; }); + // changability + // deploy the same association with different props + var workflowDefChanges = workflowDef.Inherit(def => + { + def.AllowManual = !def.AllowManual; + def.AutoStartChange = !def.AutoStartChange; + def.AutoStartCreate = !def.AutoStartCreate; + + 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 => @@ -169,6 +204,7 @@ public void CanDeploy_WorkflowAssociation_UnderContentType() site.AddRandomContentType(contentType => { contentType.AddWorkflowAssociation(workflowDef); + contentType.AddWorkflowAssociation(workflowDefChanges); }); }); diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/WorkflowAssociationModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/WorkflowAssociationModelHandler.cs index 7f706e4c5..c7b0588a9 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/WorkflowAssociationModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/WorkflowAssociationModelHandler.cs @@ -175,8 +175,11 @@ private void DeployContentTypeWorkflowAssociationDefinition(SPContentType modelH } else { - // TODO, what's the logic for update? - // what to update at all? + contentType.WorkflowAssociations.Update(existingWorkflowAssotiation); + contentType.UpdateWorkflowAssociationsOnChildren(false, + true, + true, + false); } } @@ -235,8 +238,7 @@ private void DeployWebWorkflowAssociationDefinition(WebModelHost modelHost, Micr } else { - // TODO, what's the logic for update? - // what to update at all? + web.WorkflowAssociations.Update(existingWorkflowAssotiation); } } @@ -295,7 +297,7 @@ private void DeployListWorkflowAssociationDefinition(ListModelHost modelHost, SP } else { - // ?? + list.WorkflowAssociations.Update(existingWorkflowAssotiation); } } From e51fae9a8de0c770bbc86758645e27604040c1fb Mon Sep 17 00:00:00 2001 From: "support@subpointsolutions.com" Date: Fri, 12 Aug 2016 05:36:56 -0700 Subject: [PATCH 10/12] + Enhance WorkflowAssociationDefinition - add more tests on updatability #871 + CSOM/SSOM implementations --- .../WorkflowAssociationModelHandler.cs | 17 +++++- ...tWorkflowAssociationDefinitionValidator.cs | 60 +++++++++++++++---- .../WorkflowAssociationScenariosTest.cs | 24 +++++--- 3 files changed, 79 insertions(+), 22 deletions(-) diff --git a/SPMeta2/SPMeta2.CSOM/ModelHandlers/WorkflowAssociationModelHandler.cs b/SPMeta2/SPMeta2.CSOM/ModelHandlers/WorkflowAssociationModelHandler.cs index 292942020..4a43df67c 100644 --- a/SPMeta2/SPMeta2.CSOM/ModelHandlers/WorkflowAssociationModelHandler.cs +++ b/SPMeta2/SPMeta2.CSOM/ModelHandlers/WorkflowAssociationModelHandler.cs @@ -211,6 +211,14 @@ private void DeployContentTypeWorkflowAssociationDefinition(object modelHost, Co ModelHost = modelHost }); + // no update + // gives weird null ref exception + + // Enhance WorkflowAssociationDefinition - add more tests on updatability #871 + // https://github.com/SubPointSolutions/spmeta2/issues/871 + + //existingWorkflowAssotiation.Update(); + contentType.Update(true); context.ExecuteQueryWithTrace(); } @@ -289,7 +297,14 @@ private void DeployWebWorkflowAssociationDefinition(WebModelHost modelHost, Web ModelHost = modelHost }); - web.Update(); + // no update + // gives weird null ref exception + + // Enhance WorkflowAssociationDefinition - add more tests on updatability #871 + // https://github.com/SubPointSolutions/spmeta2/issues/871 + + //existingWorkflowAssotiation.Update(); + //web.Update(); context.ExecuteQueryWithTrace(); } } diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientWorkflowAssociationDefinitionValidator.cs b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientWorkflowAssociationDefinitionValidator.cs index 2a9ae9af3..94b3958f0 100644 --- a/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientWorkflowAssociationDefinitionValidator.cs +++ b/SPMeta2/SPMeta2.Regression.CSOM/Validation/ClientWorkflowAssociationDefinitionValidator.cs @@ -63,30 +63,66 @@ public override void DeployModel(object modelHost, DefinitionBase model) assert.SkipProperty(m => m.Description); } - if (!string.IsNullOrEmpty(definition.AssociationData)) - assert.ShouldBeEqual(m => m.AssociationData, o => o.AssociationData); + if (modelHost is WebModelHost || + modelHost is ModelHostContext) + { + assert.SkipProperty(m => m.AssociationData, + "Skipping AssociationData valiation. CSOM deployment under web/content does not seem to update it."); + } else - assert.SkipProperty(m => m.AssociationData); + { + if (!string.IsNullOrEmpty(definition.AssociationData)) + assert.ShouldBeEqual(m => m.AssociationData, o => o.AssociationData); + else + assert.SkipProperty(m => m.AssociationData); + } if (definition.Enabled.HasValue) assert.ShouldBeEqual(m => m.Enabled, o => o.Enabled); else assert.SkipProperty(m => m.Enabled); - if (definition.AllowManual.HasValue) - assert.ShouldBeEqual(m => m.AllowManual, o => o.AllowManual); + if (modelHost is WebModelHost || + modelHost is ModelHostContext) + { + assert.SkipProperty(m => m.AllowManual, + "Skipping AutoStartCreate valiation. CSOM deployment under web/content does not seem to update it."); + } else - assert.SkipProperty(m => m.AllowManual); + { + if (definition.AllowManual.HasValue) + assert.ShouldBeEqual(m => m.AllowManual, o => o.AllowManual); + else + assert.SkipProperty(m => m.AllowManual); + } - if (definition.AutoStartChange.HasValue) - assert.ShouldBeEqual(m => m.AutoStartChange, o => o.AutoStartChange); + if (modelHost is WebModelHost || + modelHost is ModelHostContext) + { + assert.SkipProperty(m => m.AutoStartChange, + "Skipping AutoStartChange valiation. CSOM deployment under web/content does not seem to update it."); + } else - assert.SkipProperty(m => m.AutoStartChange); + { + if (definition.AutoStartChange.HasValue) + assert.ShouldBeEqual(m => m.AutoStartChange, o => o.AutoStartChange); + else + assert.SkipProperty(m => m.AutoStartChange); + } - if (definition.AutoStartCreate.HasValue) - assert.ShouldBeEqual(m => m.AutoStartCreate, o => o.AutoStartCreate); + if (modelHost is WebModelHost || + modelHost is ModelHostContext) + { + assert.SkipProperty(m => m.AutoStartCreate, + "Skipping AutoStartCreate valiation. CSOM deployment under web/content does not seem to update it."); + } else - assert.SkipProperty(m => m.AutoStartCreate); + { + if (definition.AutoStartCreate.HasValue) + assert.ShouldBeEqual(m => m.AutoStartCreate, o => o.AutoStartCreate); + else + assert.SkipProperty(m => m.AutoStartCreate); + } if (!string.IsNullOrEmpty(definition.TaskListTitle)) assert.ShouldBeEqual(m => m.TaskListTitle, o => o.TaskListTitle); diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs index e4bc9b6d0..4d40857aa 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WorkflowAssociationScenariosTest.cs @@ -88,9 +88,11 @@ public void CanDeploy_WorkflowAssociation_UnderWeb() // deploy the same association with different props var workflowDefChanges = workflowDef.Inherit(def => { - def.AllowManual = !def.AllowManual; - def.AutoStartChange = !def.AutoStartChange; - def.AutoStartCreate = !def.AutoStartCreate; + var value = Rnd.Bool(); + + def.AllowManual = value; + def.AutoStartChange = !value; + def.AutoStartCreate = value; def.AssociationData = Rnd.String(); }); @@ -133,9 +135,11 @@ public void CanDeploy_WorkflowAssociation_UnderList() // deploy the same association with different props var workflowDefChanges = workflowDef.Inherit(def => { - def.AllowManual = !def.AllowManual; - def.AutoStartChange = !def.AutoStartChange; - def.AutoStartCreate = !def.AutoStartCreate; + var value = Rnd.Bool(); + + def.AllowManual = value; + def.AutoStartChange = !value; + def.AutoStartCreate = value; def.AssociationData = Rnd.String(); }); @@ -184,9 +188,11 @@ public void CanDeploy_WorkflowAssociation_UnderContentType() // deploy the same association with different props var workflowDefChanges = workflowDef.Inherit(def => { - def.AllowManual = !def.AllowManual; - def.AutoStartChange = !def.AutoStartChange; - def.AutoStartCreate = !def.AutoStartCreate; + var value = Rnd.Bool(); + + def.AllowManual = value; + def.AutoStartChange = !value; + def.AutoStartCreate = value; def.AssociationData = Rnd.String(); }); From 6844f08a2d514b64c0ee33a7e95e9247ea48ba5d Mon Sep 17 00:00:00 2001 From: "support@subpointsolutions.com" Date: Fri, 12 Aug 2016 07:13:13 -0700 Subject: [PATCH 11/12] + SSOM - WebPartPageDefinition.CustomPageLayout seems to put only the last web part on the page #869 --- ...stomWebPartPageLayoutTemplates.Designer.cs | 75 + .../CustomWebPartPageLayoutTemplates.resx | 192 ++ .../SPMeta2.Containers.csproj | 9 + .../Impl/Scenarios/WebpartScenariosTest.cs | 2168 +++++++++-------- .../ModelHandlers/WebPartPageModelHandler.cs | 625 ++--- .../BuiltInListViewDefinitions.cs | 6 + 6 files changed, 1703 insertions(+), 1372 deletions(-) create mode 100644 SPMeta2/SPMeta2.Containers/CustomWebPartPageLayoutTemplates.Designer.cs create mode 100644 SPMeta2/SPMeta2.Containers/CustomWebPartPageLayoutTemplates.resx diff --git a/SPMeta2/SPMeta2.Containers/CustomWebPartPageLayoutTemplates.Designer.cs b/SPMeta2/SPMeta2.Containers/CustomWebPartPageLayoutTemplates.Designer.cs new file mode 100644 index 000000000..be34e9359 --- /dev/null +++ b/SPMeta2/SPMeta2.Containers/CustomWebPartPageLayoutTemplates.Designer.cs @@ -0,0 +1,75 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SPMeta2.Containers { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class CustomWebPartPageLayoutTemplates { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal CustomWebPartPageLayoutTemplates() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SPMeta2.Containers.CustomWebPartPageLayoutTemplates", typeof(CustomWebPartPageLayoutTemplates).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to <%@ Page Language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:webpartpageexpansion="full" meta:progid="SharePoint.WebPartPage.Document" %> + /// + ///<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> + ///<%@ Register TagPrefix="Utilities [rest of string was truncated]";. + /// + public static string Custom1 { + get { + return ResourceManager.GetString("Custom1", resourceCulture); + } + } + } +} diff --git a/SPMeta2/SPMeta2.Containers/CustomWebPartPageLayoutTemplates.resx b/SPMeta2/SPMeta2.Containers/CustomWebPartPageLayoutTemplates.resx new file mode 100644 index 000000000..bfde1dec0 --- /dev/null +++ b/SPMeta2/SPMeta2.Containers/CustomWebPartPageLayoutTemplates.resx @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + <%@ Page Language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:webpartpageexpansion="full" meta:progid="SharePoint.WebPartPage.Document" %> + +<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> +<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> +<%@ Import Namespace="Microsoft.SharePoint" %> +<%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> +<%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> + +<asp:Content ContentPlaceHolderID="PlaceHolderPageTitle" runat="server"> + <SharePoint:ListFormPageTitle runat="server" /> +</asp:Content> +<asp:Content ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server"> + <span class="die"> + <SharePoint:ListProperty Property="LinkTitle" runat="server" ID="ID_LinkTitle" /> + </span> +</asp:Content> +<asp:Content ContentPlaceHolderID="PlaceHolderPageImage" runat="server"> + <img src="/_layouts/15/images/blank.gif?rev=23" width='1' height='1' alt="" /> +</asp:Content> +<asp:Content ContentPlaceHolderID="PlaceHolderMain" runat="server"> + <table class="ms-core-tableNoSpace" id="onetIDListForm"> + <tr> + <td> + <WebPartPages:WebPartZone runat="server" FrameType="None" ID="Main" Title="loc:Main"> + <ZoneTemplate> + </ZoneTemplate> + </WebPartPages:WebPartZone> + </td> + </tr> + </table> +</asp:Content> +<asp:Content ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server"> + <SharePoint:DelegateControl runat="server" ControlId="FormCustomRedirectControl" AllowMultipleControls="true" /> +</asp:Content> +<asp:Content ContentPlaceHolderID="PlaceHolderTitleLeftBorder" runat="server"> + <table cellpadding="0" height="100%" width="100%" cellspacing="0"> + <tr> + <td class="ms-areaseparatorleft"> + <img src="/_layouts/15/images/blank.gif?rev=23" width='1' height='1' alt="" /></td> + </tr> + </table> +</asp:Content> +<asp:Content ContentPlaceHolderID="PlaceHolderTitleAreaClass" runat="server"> + <script type="text/javascript" id="onetidPageTitleAreaFrameScript"> + if (document.getElementById("onetidPageTitleAreaFrame") != null) { + document.getElementById("onetidPageTitleAreaFrame").className = "ms-areaseparator"; + } + </script> +</asp:Content> +<asp:Content ContentPlaceHolderID="PlaceHolderBodyAreaClass" runat="server"> + <SharePoint:StyleBlock runat="server"> + .ms-bodyareaframe { + padding: 8px; + border: none; + } + </SharePoint:StyleBlock> +</asp:Content> +<asp:Content ContentPlaceHolderID="PlaceHolderBodyLeftBorder" runat="server"> + <div class='ms-areaseparatorleft'> + <img src="/_layouts/15/images/blank.gif?rev=23" width='8' height='100%' alt="" /></div> +</asp:Content> +<asp:Content ContentPlaceHolderID="PlaceHolderTitleRightMargin" runat="server"> + <div class='ms-areaseparatorright'> + <img src="/_layouts/15/images/blank.gif?rev=23" width='8' height='100%' alt="" /></div> +</asp:Content> +<asp:Content ContentPlaceHolderID="PlaceHolderBodyRightMargin" runat="server"> + <div class='ms-areaseparatorright'> + <img src="/_layouts/15/images/blank.gif?rev=23" width='8' height='100%' alt="" /></div> +</asp:Content> +<asp:Content ContentPlaceHolderID="PlaceHolderTitleAreaSeparator" runat="server" /> + + \ No newline at end of file diff --git a/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj b/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj index ead5929e6..5826467c7 100644 --- a/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj +++ b/SPMeta2/SPMeta2.Containers/SPMeta2.Containers.csproj @@ -82,6 +82,11 @@ + + True + True + CustomWebPartPageLayoutTemplates.resx + True True @@ -259,6 +264,10 @@ + + PublicResXFileCodeGenerator + CustomWebPartPageLayoutTemplates.Designer.cs + ResXFileCodeGenerator DefaultDwpWebpartTemplates.Designer.cs diff --git a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WebpartScenariosTest.cs b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WebpartScenariosTest.cs index 68d4594b4..a20cced83 100644 --- a/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WebpartScenariosTest.cs +++ b/SPMeta2/SPMeta2.Regression.Tests/Impl/Scenarios/WebpartScenariosTest.cs @@ -1,80 +1,81 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Microsoft.VisualStudio.TestTools.UnitTesting; -using SPMeta2.BuiltInDefinitions; -using SPMeta2.Containers; -using SPMeta2.Containers.Extensions; -using SPMeta2.Containers.Services; -using SPMeta2.Containers.Standard; -using SPMeta2.Definitions; -using SPMeta2.Definitions.Base; -using SPMeta2.Definitions.Webparts; -using SPMeta2.Enumerations; -using SPMeta2.Regression.Tests.Base; -using SPMeta2.Regression.Tests.Definitions; -using SPMeta2.Regression.Tests.Impl.Scenarios.Base; -using SPMeta2.Standard.Definitions; -using SPMeta2.Standard.Syntax; -using SPMeta2.Syntax.Default; -using SPMeta2.Validation.Validators.Relationships; -using SPMeta2.Models; -using SPMeta2.Syntax.Extended; - -namespace SPMeta2.Regression.Tests.Impl.Scenarios -{ - [TestClass] - public class WebpartScenariosTest : SPMeta2RegresionScenarioTestBase - { - #region internal - - [ClassInitializeAttribute] - public static void Init(TestContext context) - { - InternalInit(); - } - - [ClassCleanupAttribute] - public static void Cleanup() - { - InternalCleanup(); - } - - #endregion - - #region v2-v3 validation - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.Versions")] - public void CanDeploy_Random_V2_Webpart() - { - TestRandomDefinition(def => - { - def.WebpartFileName = string.Empty; - def.WebpartType = string.Empty; - def.WebpartXmlTemplate = BuiltInWebPartTemplates.ContentEditorWebPart; - }); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.Versions")] - public void CanDeploy_Random_V3_Webpart() - { - TestRandomDefinition(def => - { - def.WebpartFileName = string.Empty; - def.WebpartType = string.Empty; - def.WebpartXmlTemplate = BuiltInWebPartTemplates.ScriptEditorWebPart; - }); - } - - #endregion - - - #region v2-v3 chrome - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using SPMeta2.BuiltInDefinitions; +using SPMeta2.Containers; +using SPMeta2.Containers.Extensions; +using SPMeta2.Containers.Services; +using SPMeta2.Containers.Standard; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; +using SPMeta2.Definitions.Webparts; +using SPMeta2.Enumerations; +using SPMeta2.Regression.Tests.Base; +using SPMeta2.Regression.Tests.Definitions; +using SPMeta2.Regression.Tests.Impl.Scenarios.Base; +using SPMeta2.Standard.Definitions; +using SPMeta2.Standard.Syntax; +using SPMeta2.Syntax.Default; +using SPMeta2.Validation.Validators.Relationships; +using SPMeta2.Models; +using SPMeta2.Syntax.Extended; +using SPMeta2.Utils; + +namespace SPMeta2.Regression.Tests.Impl.Scenarios +{ + [TestClass] + public class WebpartScenariosTest : SPMeta2RegresionScenarioTestBase + { + #region internal + + [ClassInitializeAttribute] + public static void Init(TestContext context) + { + InternalInit(); + } + + [ClassCleanupAttribute] + public static void Cleanup() + { + InternalCleanup(); + } + + #endregion + + #region v2-v3 validation + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.Versions")] + public void CanDeploy_Random_V2_Webpart() + { + TestRandomDefinition(def => + { + def.WebpartFileName = string.Empty; + def.WebpartType = string.Empty; + def.WebpartXmlTemplate = BuiltInWebPartTemplates.ContentEditorWebPart; + }); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.Versions")] + public void CanDeploy_Random_V3_Webpart() + { + TestRandomDefinition(def => + { + def.WebpartFileName = string.Empty; + def.WebpartType = string.Empty; + def.WebpartXmlTemplate = BuiltInWebPartTemplates.ScriptEditorWebPart; + }); + } + + #endregion + + + #region v2-v3 chrome + private static List PartChromeTypes = new List { "Default", @@ -82,8 +83,8 @@ public void CanDeploy_Random_V3_Webpart() "None", "TitleOnly", "BorderOnly" - }; - + }; + private static List FrameTypes = new List { "None", @@ -91,985 +92,1030 @@ public void CanDeploy_Random_V3_Webpart() "TitleBarOnly", "Default", "BorderOnly" - }; - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ChromeType")] - public void CanDeploy_Random_V2_Webpart_WithAllChrome() - { - var allValues = new List(); - - allValues.AddRange(PartChromeTypes); - allValues.AddRange(FrameTypes); - - foreach (var chromeType in allValues) - { - var type = chromeType; - - TestRandomDefinition(def => - { - def.ChromeType = type; - - def.WebpartFileName = string.Empty; - def.WebpartType = string.Empty; - def.WebpartXmlTemplate = BuiltInWebPartTemplates.ContentEditorWebPart; - }); - } - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ChromeType")] - public void CanDeploy_Random_V3_Webpart_WithAllChrome() - { - var allValues = new List(); - - allValues.AddRange(PartChromeTypes); - allValues.AddRange(FrameTypes); - - foreach (var chromeType in allValues) - { - var type = chromeType; - - TestRandomDefinition(def => - { - def.ChromeType = type; - - def.WebpartFileName = string.Empty; - def.WebpartType = string.Empty; - def.WebpartXmlTemplate = BuiltInWebPartTemplates.ScriptEditorWebPart; - }); - } - } - - #endregion - - #region list views - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListViews")] - public void CanDeploy_WebpartTo_UploadForm_InLibrary() - { - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddRandomDocumentLibrary(list => - { - list.AddHostListView(BuiltInListViewDefinitions.Libraries.Upload, listView => - { - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - }); - }); - }); - - TestModel(model); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListViews")] - public void CanDeploy_WebpartTo_OOTBListViews_InLibrary() - { - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddRandomDocumentLibrary(list => - { - list.AddHostListView(BuiltInListViewDefinitions.Libraries.AllItems, listView => - { - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - }); - - list.AddHostListView(BuiltInListViewDefinitions.Libraries.DispForm, listView => - { - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - }); - - list.AddHostListView(BuiltInListViewDefinitions.Libraries.EditForm, listView => - { - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - }); - }); - }); - - TestModel(model); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListViews")] - public void CanDeploy_WebpartTo_CustomListViews_InLibrary() - { - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddRandomDocumentLibrary(list => - { - // custom with title only - list.AddRandomListView(listView => - { - var def = listView.Value as ListViewDefinition; - def.Url = string.Empty; - def.IsDefault = false; - - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - }); - - // custom with UTL - list.AddRandomListView(listView => - { - var def = listView.Value as ListViewDefinition; - def.Url = Rnd.AspxFileName(); - def.IsDefault = false; - - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - }); - }); - - }); - - TestModel(model); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListViews")] - public void CanDeploy_WebpartTo_OOTBListViews_InList() - { - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddRandomList(list => - { - list.AddHostListView(BuiltInListViewDefinitions.Lists.AllItems, listView => - { - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - }); - - list.AddHostListView(BuiltInListViewDefinitions.Lists.EditForm, listView => - { - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - - }); - - list.AddHostListView(BuiltInListViewDefinitions.Lists.NewForm, listView => - { - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - }); - - list.AddHostListView(BuiltInListViewDefinitions.Lists.DispForm, listView => - { - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - }); - }); - - }); - - TestModel(model); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListViews")] - public void CanDeploy_WebpartTo_CustomListViews_InList() - { - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddRandomList(list => - { - // custom with title only - list.AddRandomListView(listView => - { - var def = listView.Value as ListViewDefinition; - def.Url = string.Empty; - def.IsDefault = false; - - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - }); - - // custom with UTL - list.AddRandomListView(listView => - { - var def = listView.Value as ListViewDefinition; - def.Url = Rnd.AspxFileName(); - def.IsDefault = false; - - listView.AddRandomWebpart(); - listView.AddRandomWebpart(); - }); - }); - - }); - - TestModel(model); - } - - #endregion - - #region manual list forms - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListForms")] - public void CanDeploy_WebpartTo_ListForm_InLibrary() - { - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddRandomDocumentLibrary(list => - { - list.AddHostFolder(BuiltInFolderDefinitions.Forms, folder => - { - folder.AddHostWebPartPage(new WebPartPageDefinition - { - FileName = "AllItems.aspx", - PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1, - NeedOverride = false - }, page => - { - page.AddRandomWebpart(); - page.AddRandomWebpart(); - page.AddRandomWebpart(); - }); - }); - }); - - }); - - TestModel(model); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.ListForms")] - public void CanDeploy_WebpartTo_ListForm_InList() - { - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddRandomList(list => - { - list.AddHostWebPartPage(new WebPartPageDefinition - { - FileName = "AllItems.aspx", - PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1, - NeedOverride = false - }, page => - { - page.AddRandomWebpart(); - page.AddRandomWebpart(); - page.AddRandomWebpart(); - }); - }); - - }); - - TestModel(model); - } - - #endregion - - #region webpart - - - - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts")] - public void CanDeploy_WebpartToWebpartPage() - { - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list - .AddRandomWebPartPage(page => - { - page - .AddRandomWebpart() - .AddRandomWebpart(); - }) - .AddRandomWebPartPage(page => - { - page - .AddRandomWebpart() - .AddRandomWebpart(); - }); - }); - - }); - - TestModel(model); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts")] - public void CanDeploy_Webpart_WithTitleUrl_WithTokens() - { - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list - .AddRandomWebPartPage(page => - { - page - .AddRandomWebpart(w => - { - (w.Value as WebPartDefinition).TitleUrl = - string.Format("~sitecollection/{0}.html", Rnd.String()); - }) - .AddRandomWebpart(w => - { - (w.Value as WebPartDefinition).TitleUrl = - string.Format("~site/{0}.html", Rnd.String()); - - }); - }); - }); - - }); - - TestModel(model); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts")] - public void CanDeploy_WebpartToPublishingPageWebPartZone() - { - var siteModel = SPMeta2Model - .NewSiteModel(site => - { - site - .AddSiteFeature(RegSiteFeatures.Publishing); - }); - - TestModel(siteModel); - - var webModel = SPMeta2Model - .NewWebModel(web => - { - web - .AddWebFeature(RegWebFeatures.Publishing) - .AddHostList(BuiltInListDefinitions.Pages, list => - { - list - .AddRandomPublishingPage(page => - { - page - .AddRandomWebpart() - .AddRandomWebpart(); - }) - .AddRandomPublishingPage(page => - { - page - .AddRandomWebpart() - .AddRandomWebpart(); - }); - }); - - }); - - TestModel(webModel); - } - - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts")] - public void CanDeploy_WebpartToPublishingPageContent() - { - var webModel = SPMeta2Model - .NewWebModel(web => - { - web - .AddHostList(BuiltInListDefinitions.Pages, list => - { - list - .AddRandomPublishingPage(page => - { - var id_1 = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); - var id_2 = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); - - var id_3 = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); - - var wpId11 = id_1 - .Replace("g_", string.Empty) - .Replace("_", "-"); - - var wpId22 = id_2 - .Replace("g_", string.Empty) - .Replace("_", "-"); - - var pageTemplate = new StringBuilder(); - - pageTemplate.AppendFormat("​​​​​​​​​​​​​​​​​​​​​​
"); - pageTemplate.AppendFormat("
", wpId11); - pageTemplate.AppendFormat("
"); - pageTemplate.AppendFormat("
"); - - pageTemplate.AppendFormat("
"); - pageTemplate.AppendFormat(" SPMeta2 publishing page."); - pageTemplate.AppendFormat("
"); - - pageTemplate.AppendFormat("​​​​​​​​​​​​​​​​​​​​​​
"); - pageTemplate.AppendFormat("
", wpId22); - pageTemplate.AppendFormat("
"); - pageTemplate.AppendFormat("
"); - - (page.Value as PublishingPageDefinition).Content = pageTemplate.ToString(); - - page - .AddRandomWebpart(wpNode => - { - var wp = wpNode.Value as WebPartDefinition; - - wp.ZoneId = "wpz"; - wp.Id = id_1; - wp.AddToPageContent = true; - }) - .AddRandomWebpart(wpNode => - { - var wp = wpNode.Value as WebPartDefinition; - - wp.ZoneId = "wpz"; - wp.Id = id_2; - wp.AddToPageContent = true; - }) - .AddRandomWebpart(wpNode => - { - var wp = wpNode.Value as WebPartDefinition; - - wp.ZoneId = "wpz"; - wp.Id = id_3; - wp.AddToPageContent = true; - }); - }); - }); - - }); - - TestModel(webModel); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts")] - public void CanDeploy_WebpartToWikiPageContent_AsItIs() - { - // Some web part provision on wiki page give empty markup - // https://github.com/SubPointSolutions/spmeta2/issues/693 - - var webModel = SPMeta2Model - .NewWebModel(web => - { - web - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list - .AddRandomWikiPage(page => - { - page - .AddRandomWebpart() - .AddRandomWebpart() - .AddRandomWebpart(); - }); - }); - }); - - TestModel(webModel); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts")] - public void CanDeploy_ScriptEditorToWikiPageContent_As_AddToPageContent() - { - // Some web part provision on wiki page give empty markup - // https://github.com/SubPointSolutions/spmeta2/issues/693 - - // web part ID, zone and AddToPageContent must be as such - // you can move these params into your web part definition - - var scriptEditor1 = new ScriptEditorWebPartDefinition - { - Title = string.Format("ScriptEditorWebPartDefinition - {0}", Rnd.String()), - Id = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'), - ZoneIndex = 10, - ZoneId = "wpz", - AddToPageContent = true, - Content = String.Format("", - Rnd.String()) - }; - - var scriptEditor2 = new ScriptEditorWebPartDefinition - { - Title = string.Format("ScriptEditorWebPartDefinition - {0}", Rnd.String()), - Id = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'), - ZoneIndex = 10, - ZoneId = "wpz", - AddToPageContent = true, - Content = String.Format("", - Rnd.String()) - }; - - var webModel = SPMeta2Model - .NewWebModel(web => - { - web - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list - .AddRandomWikiPage(page => - { - page.RegExcludeFromValidation(); - - page.AddScriptEditorWebPart(scriptEditor1); - page.AddScriptEditorWebPart(scriptEditor2); - }); - }); - }); - - TestModel(webModel); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts")] - public void CanDeploy_WebpartToWikiPageContent_As_AddToPageContent() - { - // Some web part provision on wiki page give empty markup - // https://github.com/SubPointSolutions/spmeta2/issues/693 - - // web part ID, zone and AddToPageContent must be as such - // you can move these params into your web part definition - - var listViewWebPartDef = new ListViewWebPartDefinition - { - Title = String.Format("ListViewWebPartDefinition - {0}", Rnd.String()), - Id = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'), - ZoneIndex = 10, - ZoneId = "wpz", - AddToPageContent = true, - ListUrl = BuiltInListDefinitions.SitePages.CustomUrl - }; - - var webModel = SPMeta2Model - .NewWebModel(web => - { - web - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list - .AddRandomWikiPage(page => - { - page.RegExcludeFromValidation(); - - page - .AddListViewWebPart(listViewWebPartDef) - .AddRandomWebpart(wpNode => - { - var wp = wpNode.Value as WebPartDefinition; - - wp.Id = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); - wp.ZoneId = "wpz"; - wp.AddToPageContent = true; - }) - .AddRandomWebpart(wpNode => - { - var wp = wpNode.Value as WebPartDefinition; - - wp.Id = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); - wp.ZoneId = "wpz"; - wp.AddToPageContent = true; - }) - .AddRandomWebpart(wpNode => - { - var wp = wpNode.Value as WebPartDefinition; - - wp.Id = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); - wp.ZoneId = "wpz"; - wp.AddToPageContent = true; - }) - ; - }); - }); - }); - - TestModel(webModel); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts")] - public void CanDeploy_WebpartToWikiPageContent() - { - var webModel = SPMeta2Model - .NewWebModel(web => - { - web - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list - .AddRandomWikiPage(page => - { - page.RegExcludeFromValidation(); - - var id_1 = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); - var id_2 = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); - - var id_3 = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); - - var wpId11 = id_1 - .Replace("g_", string.Empty) - .Replace("_", "-"); - - var wpId22 = id_2 - .Replace("g_", string.Empty) - .Replace("_", "-"); - - var pageTemplate = new StringBuilder(); - - pageTemplate.AppendFormat("​​​​​​​​​​​​​​​​​​​​​​
"); - pageTemplate.AppendFormat("
", wpId11); - pageTemplate.AppendFormat("
"); - pageTemplate.AppendFormat("
"); - - pageTemplate.AppendFormat("
"); - pageTemplate.AppendFormat(" SPMeta2 wiki page."); - pageTemplate.AppendFormat("
"); - - pageTemplate.AppendFormat("​​​​​​​​​​​​​​​​​​​​​​
"); - pageTemplate.AppendFormat("
", wpId22); - pageTemplate.AppendFormat("
"); - pageTemplate.AppendFormat("
"); - - (page.Value as WikiPageDefinition).Content = pageTemplate.ToString(); - - page - .AddRandomWebpart(wpNode => - { - var wp = wpNode.Value as WebPartDefinition; - - wp.ZoneId = "wpz"; - wp.Id = id_1; - wp.AddToPageContent = true; - }) - .AddRandomWebpart(wpNode => - { - var wp = wpNode.Value as WebPartDefinition; - - wp.ZoneId = "wpz"; - wp.Id = id_2; - wp.AddToPageContent = true; - }) - .AddRandomWebpart(wpNode => - { - var wp = wpNode.Value as WebPartDefinition; - - wp.ZoneId = "wpz"; - wp.Id = id_3; - wp.AddToPageContent = true; - }); - }); - }); - - }); - - TestModel(webModel); - } - - #endregion - - #region deleting - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.Deletion")] - public void CanDeploy_DeleteWebpartFromWebpartPage() - { - var wpPage = ModelGeneratorService.GetRandomDefinition(); - - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list - .AddWebPartPage(wpPage, page => - { - page - .AddRandomWebpart() - .AddRandomWebpart(); - }); - }); - - }); - - var deleteModel = SPMeta2Model - .NewWebModel(web => - { - web - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list - .AddHostWebPartPage(wpPage, page => - { - page - .AddDeleteWebParts(new DeleteWebPartsDefinition()); - }); - }); - - }); - - TestModel(model, deleteModel); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.Deletion")] - public void CanDeploy_DeleteWebpartFromPublishingPage() - { - var wpPage = ModelGeneratorService.GetRandomDefinition(); - - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddHostList(BuiltInListDefinitions.Pages, list => - { - list - .AddPublishingPage(wpPage, page => - { - page - .AddRandomWebpart() - .AddRandomWebpart(); - }); - }); - - }); - - var deleteModel = SPMeta2Model - .NewWebModel(web => - { - web - .AddHostList(BuiltInListDefinitions.Pages, list => - { - list - .AddHostPublishingPage(wpPage, page => - { - page - .AddDeleteWebParts(new DeleteWebPartsDefinition()); - }); - }); - - }); - - TestModel(model, deleteModel); - } - - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.Deletion")] - public void CanDeploy_DeleteWebpartFromWikiPage() - { - var wpPage = ModelGeneratorService.GetRandomDefinition(); - - var model = SPMeta2Model - .NewWebModel(web => - { - web - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list - .AddWikiPage(wpPage, page => - { - page - .AddRandomWebpart() - .AddRandomWebpart(); - }); - }); - - }); - - var deleteModel = SPMeta2Model - .NewWebModel(web => - { - web - .AddHostList(BuiltInListDefinitions.SitePages, list => - { - list - .AddHostWikiPage(wpPage, page => - { - page - .AddDeleteWebParts(new DeleteWebPartsDefinition()); - }); - }); - - }); - - TestModel(model, deleteModel); - } - #endregion - - #region removing by title - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.Deletion")] - public void CanDeploy_DeleteWebpart_ByTitle() - { - var wpPage = ModelGeneratorService.GetRandomDefinition(); - - var title1 = "title1_" + Rnd.String(); - var title2 = "title2_" + Rnd.String(); - - var wp1 = ModelGeneratorService.GetRandomDefinition(def => - { - def.Title = title1; - }); - - var wp2 = ModelGeneratorService.GetRandomDefinition(def => - { - def.Title = title2; - }); - - var model = SPMeta2Model.NewWebModel(web => - { - web.AddHostList(BuiltInListDefinitions.SitePages, list => - { - list.AddWikiPage(wpPage, page => - { - page.AddWebParts(new[] { wp1, wp2 }); - }); - }); - - }); - - var wpDeletionDef = new DeleteWebPartsDefinition - { - - }; - - wpDeletionDef.WebParts.Add(new WebPartMatch - { - Title = title1 - }); - - var deleteModel = SPMeta2Model.NewWebModel(web => - { - web.AddHostList(BuiltInListDefinitions.SitePages, list => - { - list.AddHostWikiPage(wpPage, page => - { - page.AddDeleteWebParts(wpDeletionDef); - }); - }); - - }); - - TestModel(model, deleteModel); - } - - #endregion - - #region properties - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.Properties")] - public void CanDeploy_V2_Webpart_With_Properties() - { - var webpart = ModelGeneratorService.GetRandomDefinition(def => - { - def.WebpartFileName = string.Empty; - def.WebpartType = string.Empty; - def.WebpartXmlTemplate = BuiltInWebPartTemplates.ContentEditorWebPart; - }); - - webpart.Properties.Add(new WebPartProperty - { - Name = "AllowEdit", - Value = Rnd.Bool().ToString().ToLower() - }); - - webpart.Properties.Add(new WebPartProperty - { - Name = "Description", - Value = Rnd.Bool().ToString().ToLower() - }); - - var model = SPMeta2Model.NewWebModel(web => - { - web - .AddHostSitePagesList(list => - { - list.AddRandomWebPartPage(page => - { - page.AddWebPart(webpart); - }); - }); - }); - - TestModel(model); - } - - [TestMethod] - [TestCategory("Regression.Scenarios.Webparts.Properties")] - public void CanDeploy_V3_Webpart_With_Properties() - { - var webpart = ModelGeneratorService.GetRandomDefinition(def => - { - def.WebpartFileName = string.Empty; - def.WebpartType = string.Empty; - def.WebpartXmlTemplate = BuiltInWebPartTemplates.ScriptEditorWebPart; - }); - - webpart.Properties.Add(new WebPartProperty - { - Name = "AllowEdit", - Value = Rnd.Bool().ToString().ToLower() - }); - - webpart.Properties.Add(new WebPartProperty - { - Name = "Description", - Value = Rnd.Bool().ToString().ToLower() - }); - - var model = SPMeta2Model.NewWebModel(web => - { - web - .AddHostSitePagesList(list => - { - list.AddRandomWebPartPage(page => - { - page.AddWebPart(webpart); - }); - }); - }); - - TestModel(model); - } - - - #endregion - } - -} + }; + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ChromeType")] + public void CanDeploy_Random_V2_Webpart_WithAllChrome() + { + var allValues = new List(); + + allValues.AddRange(PartChromeTypes); + allValues.AddRange(FrameTypes); + + foreach (var chromeType in allValues) + { + var type = chromeType; + + TestRandomDefinition(def => + { + def.ChromeType = type; + + def.WebpartFileName = string.Empty; + def.WebpartType = string.Empty; + def.WebpartXmlTemplate = BuiltInWebPartTemplates.ContentEditorWebPart; + }); + } + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ChromeType")] + public void CanDeploy_Random_V3_Webpart_WithAllChrome() + { + var allValues = new List(); + + allValues.AddRange(PartChromeTypes); + allValues.AddRange(FrameTypes); + + foreach (var chromeType in allValues) + { + var type = chromeType; + + TestRandomDefinition(def => + { + def.ChromeType = type; + + def.WebpartFileName = string.Empty; + def.WebpartType = string.Empty; + def.WebpartXmlTemplate = BuiltInWebPartTemplates.ScriptEditorWebPart; + }); + } + } + + #endregion + + #region list views + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViews")] + public void CanDeploy_WebpartTo_UploadForm_InLibrary() + { + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddRandomDocumentLibrary(list => + { + list.AddHostListView(BuiltInListViewDefinitions.Libraries.Upload, listView => + { + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + }); + }); + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViews")] + public void CanDeploy_WebpartTo_OOTBListViews_InLibrary() + { + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddRandomDocumentLibrary(list => + { + list.AddHostListView(BuiltInListViewDefinitions.Libraries.AllItems, listView => + { + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + }); + + list.AddHostListView(BuiltInListViewDefinitions.Libraries.DispForm, listView => + { + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + }); + + list.AddHostListView(BuiltInListViewDefinitions.Libraries.EditForm, listView => + { + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + }); + }); + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViews")] + public void CanDeploy_WebpartTo_CustomListViews_InLibrary() + { + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddRandomDocumentLibrary(list => + { + // custom with title only + list.AddRandomListView(listView => + { + var def = listView.Value as ListViewDefinition; + def.Url = string.Empty; + def.IsDefault = false; + + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + }); + + // custom with UTL + list.AddRandomListView(listView => + { + var def = listView.Value as ListViewDefinition; + def.Url = Rnd.AspxFileName(); + def.IsDefault = false; + + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + }); + }); + + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViews")] + public void CanDeploy_WebpartTo_OOTBListViews_InList() + { + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddRandomList(list => + { + list.AddHostListView(BuiltInListViewDefinitions.Lists.AllItems, listView => + { + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + }); + + list.AddHostListView(BuiltInListViewDefinitions.Lists.EditForm, listView => + { + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + + }); + + list.AddHostListView(BuiltInListViewDefinitions.Lists.NewForm, listView => + { + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + }); + + list.AddHostListView(BuiltInListViewDefinitions.Lists.DispForm, listView => + { + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + }); + }); + + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListViews")] + public void CanDeploy_WebpartTo_CustomListViews_InList() + { + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddRandomList(list => + { + // custom with title only + list.AddRandomListView(listView => + { + var def = listView.Value as ListViewDefinition; + def.Url = string.Empty; + def.IsDefault = false; + + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + }); + + // custom with UTL + list.AddRandomListView(listView => + { + var def = listView.Value as ListViewDefinition; + def.Url = Rnd.AspxFileName(); + def.IsDefault = false; + + listView.AddRandomWebpart(); + listView.AddRandomWebpart(); + }); + }); + + }); + + TestModel(model); + } + + #endregion + + #region manual list forms + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListForms")] + public void CanDeploy_WebpartTo_ListForm_InLibrary() + { + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddRandomDocumentLibrary(list => + { + list.AddHostFolder(BuiltInFolderDefinitions.Forms, folder => + { + folder.AddHostWebPartPage(new WebPartPageDefinition + { + FileName = "AllItems.aspx", + PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1, + NeedOverride = false + }, page => + { + page.AddRandomWebpart(); + page.AddRandomWebpart(); + page.AddRandomWebpart(); + }); + }); + }); + + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.ListForms")] + public void CanDeploy_WebpartTo_ListForm_InList() + { + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddRandomList(list => + { + list.AddHostWebPartPage(new WebPartPageDefinition + { + FileName = "AllItems.aspx", + PageLayoutTemplate = BuiltInWebPartPageTemplates.spstd1, + NeedOverride = false + }, page => + { + page.AddRandomWebpart(); + page.AddRandomWebpart(); + page.AddRandomWebpart(); + }); + }); + + }); + + TestModel(model); + } + + #endregion + + #region webpart + + + + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts")] + public void CanDeploy_WebpartToWebpartPage() + { + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddRandomWebPartPage(page => + { + page + .AddRandomWebpart() + .AddRandomWebpart(); + }) + .AddRandomWebPartPage(page => + { + page + .AddRandomWebpart() + .AddRandomWebpart(); + }); + }); + + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts")] + public void CanDeploy_WebpartToWebpartPage_WithCustomPageLayout() + { + var webPartPage1 = ModelGeneratorService.GetRandomDefinition(def => + { + def.CustomPageLayout = CustomWebPartPageLayoutTemplates.Custom1; + }); + + var webPartPage2 = ModelGeneratorService.GetRandomDefinition(def => + { + def.CustomPageLayout = CustomWebPartPageLayoutTemplates.Custom1; + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddWebPartPage(webPartPage1, page => + { + // the content will be changed + page.RegExcludeFromValidation(); + + page + .AddRandomWebpart() + .AddRandomWebpart(); + }) + .AddWebPartPage(webPartPage2, page => + { + // the content will be changed + page.RegExcludeFromValidation(); + + page + .AddRandomWebpart() + .AddRandomWebpart(); + }); + }); + + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts")] + public void CanDeploy_Webpart_WithTitleUrl_WithTokens() + { + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddRandomWebPartPage(page => + { + page + .AddRandomWebpart(w => + { + (w.Value as WebPartDefinition).TitleUrl = + string.Format("~sitecollection/{0}.html", Rnd.String()); + }) + .AddRandomWebpart(w => + { + (w.Value as WebPartDefinition).TitleUrl = + string.Format("~site/{0}.html", Rnd.String()); + + }); + }); + }); + + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts")] + public void CanDeploy_WebpartToPublishingPageWebPartZone() + { + var siteModel = SPMeta2Model + .NewSiteModel(site => + { + site + .AddSiteFeature(RegSiteFeatures.Publishing); + }); + + TestModel(siteModel); + + var webModel = SPMeta2Model + .NewWebModel(web => + { + web + .AddWebFeature(RegWebFeatures.Publishing) + .AddHostList(BuiltInListDefinitions.Pages, list => + { + list + .AddRandomPublishingPage(page => + { + page + .AddRandomWebpart() + .AddRandomWebpart(); + }) + .AddRandomPublishingPage(page => + { + page + .AddRandomWebpart() + .AddRandomWebpart(); + }); + }); + + }); + + TestModel(webModel); + } + + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts")] + public void CanDeploy_WebpartToPublishingPageContent() + { + var webModel = SPMeta2Model + .NewWebModel(web => + { + web + .AddHostList(BuiltInListDefinitions.Pages, list => + { + list + .AddRandomPublishingPage(page => + { + var id_1 = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); + var id_2 = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); + + var id_3 = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); + + var wpId11 = id_1 + .Replace("g_", string.Empty) + .Replace("_", "-"); + + var wpId22 = id_2 + .Replace("g_", string.Empty) + .Replace("_", "-"); + + var pageTemplate = new StringBuilder(); + + pageTemplate.AppendFormat("​​​​​​​​​​​​​​​​​​​​​​
"); + pageTemplate.AppendFormat("
", wpId11); + pageTemplate.AppendFormat("
"); + pageTemplate.AppendFormat("
"); + + pageTemplate.AppendFormat("
"); + pageTemplate.AppendFormat(" SPMeta2 publishing page."); + pageTemplate.AppendFormat("
"); + + pageTemplate.AppendFormat("​​​​​​​​​​​​​​​​​​​​​​
"); + pageTemplate.AppendFormat("
", wpId22); + pageTemplate.AppendFormat("
"); + pageTemplate.AppendFormat("
"); + + (page.Value as PublishingPageDefinition).Content = pageTemplate.ToString(); + + page + .AddRandomWebpart(wpNode => + { + var wp = wpNode.Value as WebPartDefinition; + + wp.ZoneId = "wpz"; + wp.Id = id_1; + wp.AddToPageContent = true; + }) + .AddRandomWebpart(wpNode => + { + var wp = wpNode.Value as WebPartDefinition; + + wp.ZoneId = "wpz"; + wp.Id = id_2; + wp.AddToPageContent = true; + }) + .AddRandomWebpart(wpNode => + { + var wp = wpNode.Value as WebPartDefinition; + + wp.ZoneId = "wpz"; + wp.Id = id_3; + wp.AddToPageContent = true; + }); + }); + }); + + }); + + TestModel(webModel); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts")] + public void CanDeploy_WebpartToWikiPageContent_AsItIs() + { + // Some web part provision on wiki page give empty markup + // https://github.com/SubPointSolutions/spmeta2/issues/693 + + var webModel = SPMeta2Model + .NewWebModel(web => + { + web + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddRandomWikiPage(page => + { + page + .AddRandomWebpart() + .AddRandomWebpart() + .AddRandomWebpart(); + }); + }); + }); + + TestModel(webModel); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts")] + public void CanDeploy_ScriptEditorToWikiPageContent_As_AddToPageContent() + { + // Some web part provision on wiki page give empty markup + // https://github.com/SubPointSolutions/spmeta2/issues/693 + + // web part ID, zone and AddToPageContent must be as such + // you can move these params into your web part definition + + var scriptEditor1 = new ScriptEditorWebPartDefinition + { + Title = string.Format("ScriptEditorWebPartDefinition - {0}", Rnd.String()), + Id = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'), + ZoneIndex = 10, + ZoneId = "wpz", + AddToPageContent = true, + Content = String.Format("", + Rnd.String()) + }; + + var scriptEditor2 = new ScriptEditorWebPartDefinition + { + Title = string.Format("ScriptEditorWebPartDefinition - {0}", Rnd.String()), + Id = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'), + ZoneIndex = 10, + ZoneId = "wpz", + AddToPageContent = true, + Content = String.Format("", + Rnd.String()) + }; + + var webModel = SPMeta2Model + .NewWebModel(web => + { + web + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddRandomWikiPage(page => + { + page.RegExcludeFromValidation(); + + page.AddScriptEditorWebPart(scriptEditor1); + page.AddScriptEditorWebPart(scriptEditor2); + }); + }); + }); + + TestModel(webModel); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts")] + public void CanDeploy_WebpartToWikiPageContent_As_AddToPageContent() + { + // Some web part provision on wiki page give empty markup + // https://github.com/SubPointSolutions/spmeta2/issues/693 + + // web part ID, zone and AddToPageContent must be as such + // you can move these params into your web part definition + + var listViewWebPartDef = new ListViewWebPartDefinition + { + Title = String.Format("ListViewWebPartDefinition - {0}", Rnd.String()), + Id = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'), + ZoneIndex = 10, + ZoneId = "wpz", + AddToPageContent = true, + ListUrl = BuiltInListDefinitions.SitePages.CustomUrl + }; + + var webModel = SPMeta2Model + .NewWebModel(web => + { + web + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddRandomWikiPage(page => + { + page.RegExcludeFromValidation(); + + page + .AddListViewWebPart(listViewWebPartDef) + .AddRandomWebpart(wpNode => + { + var wp = wpNode.Value as WebPartDefinition; + + wp.Id = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); + wp.ZoneId = "wpz"; + wp.AddToPageContent = true; + }) + .AddRandomWebpart(wpNode => + { + var wp = wpNode.Value as WebPartDefinition; + + wp.Id = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); + wp.ZoneId = "wpz"; + wp.AddToPageContent = true; + }) + .AddRandomWebpart(wpNode => + { + var wp = wpNode.Value as WebPartDefinition; + + wp.Id = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); + wp.ZoneId = "wpz"; + wp.AddToPageContent = true; + }) + ; + }); + }); + }); + + TestModel(webModel); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts")] + public void CanDeploy_WebpartToWikiPageContent() + { + var webModel = SPMeta2Model + .NewWebModel(web => + { + web + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddRandomWikiPage(page => + { + page.RegExcludeFromValidation(); + + var id_1 = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); + var id_2 = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); + + var id_3 = "g_" + Guid.NewGuid().ToString("D").Replace('-', '_'); + + var wpId11 = id_1 + .Replace("g_", string.Empty) + .Replace("_", "-"); + + var wpId22 = id_2 + .Replace("g_", string.Empty) + .Replace("_", "-"); + + var pageTemplate = new StringBuilder(); + + pageTemplate.AppendFormat("​​​​​​​​​​​​​​​​​​​​​​
"); + pageTemplate.AppendFormat("
", wpId11); + pageTemplate.AppendFormat("
"); + pageTemplate.AppendFormat("
"); + + pageTemplate.AppendFormat("
"); + pageTemplate.AppendFormat(" SPMeta2 wiki page."); + pageTemplate.AppendFormat("
"); + + pageTemplate.AppendFormat("​​​​​​​​​​​​​​​​​​​​​​
"); + pageTemplate.AppendFormat("
", wpId22); + pageTemplate.AppendFormat("
"); + pageTemplate.AppendFormat("
"); + + (page.Value as WikiPageDefinition).Content = pageTemplate.ToString(); + + page + .AddRandomWebpart(wpNode => + { + var wp = wpNode.Value as WebPartDefinition; + + wp.ZoneId = "wpz"; + wp.Id = id_1; + wp.AddToPageContent = true; + }) + .AddRandomWebpart(wpNode => + { + var wp = wpNode.Value as WebPartDefinition; + + wp.ZoneId = "wpz"; + wp.Id = id_2; + wp.AddToPageContent = true; + }) + .AddRandomWebpart(wpNode => + { + var wp = wpNode.Value as WebPartDefinition; + + wp.ZoneId = "wpz"; + wp.Id = id_3; + wp.AddToPageContent = true; + }); + }); + }); + + }); + + TestModel(webModel); + } + + #endregion + + #region deleting + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.Deletion")] + public void CanDeploy_DeleteWebpartFromWebpartPage() + { + var wpPage = ModelGeneratorService.GetRandomDefinition(); + + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddWebPartPage(wpPage, page => + { + page + .AddRandomWebpart() + .AddRandomWebpart(); + }); + }); + + }); + + var deleteModel = SPMeta2Model + .NewWebModel(web => + { + web + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddHostWebPartPage(wpPage, page => + { + page + .AddDeleteWebParts(new DeleteWebPartsDefinition()); + }); + }); + + }); + + TestModel(model, deleteModel); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.Deletion")] + public void CanDeploy_DeleteWebpartFromPublishingPage() + { + var wpPage = ModelGeneratorService.GetRandomDefinition(); + + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddHostList(BuiltInListDefinitions.Pages, list => + { + list + .AddPublishingPage(wpPage, page => + { + page + .AddRandomWebpart() + .AddRandomWebpart(); + }); + }); + + }); + + var deleteModel = SPMeta2Model + .NewWebModel(web => + { + web + .AddHostList(BuiltInListDefinitions.Pages, list => + { + list + .AddHostPublishingPage(wpPage, page => + { + page + .AddDeleteWebParts(new DeleteWebPartsDefinition()); + }); + }); + + }); + + TestModel(model, deleteModel); + } + + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.Deletion")] + public void CanDeploy_DeleteWebpartFromWikiPage() + { + var wpPage = ModelGeneratorService.GetRandomDefinition(); + + var model = SPMeta2Model + .NewWebModel(web => + { + web + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddWikiPage(wpPage, page => + { + page + .AddRandomWebpart() + .AddRandomWebpart(); + }); + }); + + }); + + var deleteModel = SPMeta2Model + .NewWebModel(web => + { + web + .AddHostList(BuiltInListDefinitions.SitePages, list => + { + list + .AddHostWikiPage(wpPage, page => + { + page + .AddDeleteWebParts(new DeleteWebPartsDefinition()); + }); + }); + + }); + + TestModel(model, deleteModel); + } + #endregion + + #region removing by title + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.Deletion")] + public void CanDeploy_DeleteWebpart_ByTitle() + { + var wpPage = ModelGeneratorService.GetRandomDefinition(); + + var title1 = "title1_" + Rnd.String(); + var title2 = "title2_" + Rnd.String(); + + var wp1 = ModelGeneratorService.GetRandomDefinition(def => + { + def.Title = title1; + }); + + var wp2 = ModelGeneratorService.GetRandomDefinition(def => + { + def.Title = title2; + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web.AddHostList(BuiltInListDefinitions.SitePages, list => + { + list.AddWikiPage(wpPage, page => + { + page.AddWebParts(new[] { wp1, wp2 }); + }); + }); + + }); + + var wpDeletionDef = new DeleteWebPartsDefinition + { + + }; + + wpDeletionDef.WebParts.Add(new WebPartMatch + { + Title = title1 + }); + + var deleteModel = SPMeta2Model.NewWebModel(web => + { + web.AddHostList(BuiltInListDefinitions.SitePages, list => + { + list.AddHostWikiPage(wpPage, page => + { + page.AddDeleteWebParts(wpDeletionDef); + }); + }); + + }); + + TestModel(model, deleteModel); + } + + #endregion + + #region properties + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.Properties")] + public void CanDeploy_V2_Webpart_With_Properties() + { + var webpart = ModelGeneratorService.GetRandomDefinition(def => + { + def.WebpartFileName = string.Empty; + def.WebpartType = string.Empty; + def.WebpartXmlTemplate = BuiltInWebPartTemplates.ContentEditorWebPart; + }); + + webpart.Properties.Add(new WebPartProperty + { + Name = "AllowEdit", + Value = Rnd.Bool().ToString().ToLower() + }); + + webpart.Properties.Add(new WebPartProperty + { + Name = "Description", + Value = Rnd.Bool().ToString().ToLower() + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web + .AddHostSitePagesList(list => + { + list.AddRandomWebPartPage(page => + { + page.AddWebPart(webpart); + }); + }); + }); + + TestModel(model); + } + + [TestMethod] + [TestCategory("Regression.Scenarios.Webparts.Properties")] + public void CanDeploy_V3_Webpart_With_Properties() + { + var webpart = ModelGeneratorService.GetRandomDefinition(def => + { + def.WebpartFileName = string.Empty; + def.WebpartType = string.Empty; + def.WebpartXmlTemplate = BuiltInWebPartTemplates.ScriptEditorWebPart; + }); + + webpart.Properties.Add(new WebPartProperty + { + Name = "AllowEdit", + Value = Rnd.Bool().ToString().ToLower() + }); + + webpart.Properties.Add(new WebPartProperty + { + Name = "Description", + Value = Rnd.Bool().ToString().ToLower() + }); + + var model = SPMeta2Model.NewWebModel(web => + { + web + .AddHostSitePagesList(list => + { + list.AddRandomWebPartPage(page => + { + page.AddWebPart(webpart); + }); + }); + }); + + TestModel(model); + } + + + #endregion + + + } +} diff --git a/SPMeta2/SPMeta2.SSOM/ModelHandlers/WebPartPageModelHandler.cs b/SPMeta2/SPMeta2.SSOM/ModelHandlers/WebPartPageModelHandler.cs index 8ded373ab..8bb640189 100644 --- a/SPMeta2/SPMeta2.SSOM/ModelHandlers/WebPartPageModelHandler.cs +++ b/SPMeta2/SPMeta2.SSOM/ModelHandlers/WebPartPageModelHandler.cs @@ -1,311 +1,314 @@ -using System; -using System.IO; -using System.Linq; -using Microsoft.SharePoint; -using SPMeta2.Common; -using SPMeta2.Definitions; -using SPMeta2.Definitions.Base; -using SPMeta2.ModelHandlers; -using SPMeta2.Services; -using SPMeta2.SSOM.Extensions; -using SPMeta2.Utils; -using System.Web.UI.WebControls.WebParts; -using SPMeta2.SSOM.ModelHosts; -using Microsoft.SharePoint.Utilities; -using System.Text; -using SPMeta2.Templates; - -namespace SPMeta2.SSOM.ModelHandlers -{ - public class WebPartPageModelHandler : SSOMModelHandlerBase - { - #region properties - - private const string WebPartPageCmdTemplate = - "" + - "" + - "{0}" + - "New" + - "{1}" + - "NewWebPage" + - "{2}" + - "WebPartPage" + - "{3}" + - ""; - - #endregion - - #region methods - - public override Type TargetType - { - get { return typeof(WebPartPageDefinition); } - } - - 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.WithAssertAndCast("modelHost", value => value.RequireNotNull()); - var webpartPageModel = model.WithAssertAndCast("model", value => value.RequireNotNull()); - - //var list = listModelHost.HostList; - var folder = folderModelHost.CurrentLibraryFolder; - - var targetFile = GetOrCreateNewWebPartFile(modelHost, folder, webpartPageModel); - - using (var webPartManager = targetFile.GetLimitedWebPartManager(PersonalizationScope.Shared)) - { - var webpartPageHost = new WebpartPageModelHost - { - HostFile = targetFile, - PageListItem = targetFile.Item, - SPLimitedWebPartManager = webPartManager - }; - - action(webpartPageHost); - } - } - - public override void DeployModel(object modelHost, DefinitionBase model) - { - var folderModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); - var webpartPageModel = model.WithAssertAndCast("model", value => value.RequireNotNull()); - - //var list = folderModelHost.HostList; - var folder = folderModelHost.CurrentLibraryFolder; - var targetPage = GetOrCreateNewWebPartFile(modelHost, folder, webpartPageModel); - - // gosh, it really does not have a title - //targetPage[SPBuiltInFieldId.Title] = webpartPageModel.Title; - - - - //targetPage.Update(); - } - - protected SPFile FindWebPartPage(SPFolder folder, WebPartPageDefinition webpartPageModel) - { - var webPartPageName = GetSafeWebPartPageFileName(webpartPageModel); - - if (!webPartPageName.EndsWith(".aspx")) - webPartPageName += ".aspx"; - - foreach (SPFile file in folder.Files) - if (file.Name.ToUpper() == webPartPageName.ToUpper()) - return file; - - return null; - } - - protected string GetSafeWebPartPageFileName(WebPartPageDefinition webpartPageModel) - { - var webPartPageName = webpartPageModel.FileName; - - if (!webPartPageName.EndsWith(".aspx")) - webPartPageName += ".aspx"; - - return webPartPageName; - } - - private SPFile GetOrCreateNewWebPartFile(object modelHost, SPFolder folder, - WebPartPageDefinition definition) - { - var list = folder.DocumentLibrary; - var targetFile = FindWebPartPage(folder, definition); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioning, - Object = targetFile, - ObjectType = typeof(SPFile), - ObjectDefinition = definition, - ModelHost = modelHost - }); - - if (targetFile == null || definition.NeedOverride) - { - if (definition.NeedOverride) - { - TraceService.Information((int)LogEventId.ModelProvisionProcessingExistingObject, "Processing existing web part page"); - TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "NeedOverride = true. Replacing web part page."); - } - else - { - TraceService.Information((int)LogEventId.ModelProvisionProcessingNewObject, "Processing new web part page"); - } - - var webPartPageName = GetSafeWebPartPageFileName(definition); - - byte[] fileContent = null; - - if (!string.IsNullOrEmpty(definition.CustomPageLayout)) - { - fileContent = Encoding.UTF8.GetBytes(definition.CustomPageLayout); - } - else - { - fileContent = Encoding.UTF8.GetBytes(GetWebPartPageTemplateContent(definition)); - } - - ModuleFileModelHandler.DeployModuleFile(folder, - SPUrlUtility.CombineUrl(folder.ServerRelativeUrl, webPartPageName), - webPartPageName, - fileContent, - true, - file => - { - - }, - after => - { - FieldLookupService.EnsureDefaultValues(after.ListItemAllFields, definition.DefaultValues); - - if (!string.IsNullOrEmpty(definition.ContentTypeId) || - !string.IsNullOrEmpty(definition.ContentTypeName)) - { - if (!string.IsNullOrEmpty(definition.ContentTypeId)) - after.ListItemAllFields["ContentTypeId"] = ContentTypeLookupService.LookupListContentTypeById(list, definition.ContentTypeId); - - if (!string.IsNullOrEmpty(definition.ContentTypeName)) - after.ListItemAllFields["ContentTypeId"] = ContentTypeLookupService.LookupContentTypeByName(list, definition.ContentTypeName); - } - - FieldLookupService.EnsureValues(after.ListItemAllFields, definition.Values, true); - - if (definition.DefaultValues.Any() - || definition.Values.Any() - || !string.IsNullOrEmpty(definition.ContentTypeId) - || !string.IsNullOrEmpty(definition.ContentTypeName)) - { - after.ListItemAllFields.Update(); - } - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioned, - Object = after, - ObjectType = typeof(SPFile), - ObjectDefinition = definition, - ModelHost = modelHost - }); - }); - - targetFile = FindWebPartPage(folder, definition); - } - else - { - FieldLookupService.EnsureDefaultValues(targetFile.ListItemAllFields, definition.DefaultValues); - - if (!string.IsNullOrEmpty(definition.ContentTypeId) || - !string.IsNullOrEmpty(definition.ContentTypeName)) - { - if (!string.IsNullOrEmpty(definition.ContentTypeId)) - targetFile.ListItemAllFields["ContentTypeId"] = ContentTypeLookupService.LookupListContentTypeById(list, definition.ContentTypeId); - - if (!string.IsNullOrEmpty(definition.ContentTypeName)) - targetFile.ListItemAllFields["ContentTypeId"] = ContentTypeLookupService.LookupContentTypeByName(list, definition.ContentTypeName); - } - - TraceService.Information((int)LogEventId.ModelProvisionProcessingExistingObject, "Processing existing web part page"); - TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "NeedOverride = false. Skipping replacing web part page."); - - InvokeOnModelEvent(this, new ModelEventArgs - { - CurrentModelNode = null, - Model = null, - EventType = ModelEventType.OnProvisioned, - Object = targetFile, - ObjectType = typeof(SPFile), - ObjectDefinition = definition, - ModelHost = modelHost - }); - - targetFile.Update(); - } - - return targetFile; - } - - - public virtual string GetWebPartPageTemplateContent(WebPartPageDefinition webPartPageModel) - { - // TODO, add support for SP2016 - // Built-in web part page templates should be correctly resolved for SP2010/2013 #683 - - var spRuntimeVersion = typeof(SPField).Assembly.GetName().Version; - - if (spRuntimeVersion.Major == 14) - { - return GetSP2010WebPartPageTemplateContent(webPartPageModel); - } - - if (spRuntimeVersion.Major == 15) - { - return GetSP2013WebPartPageTemplateContent(webPartPageModel); - } - - throw new Exception(string.Format("PageLayoutTemplate: [{0}] is not supported.", webPartPageModel.PageLayoutTemplate)); - } - - protected virtual string GetSP2013WebPartPageTemplateContent(WebPartPageDefinition webPartPageModel) - { - switch (webPartPageModel.PageLayoutTemplate) - { - case 1: - return SP2013WebPartPageTemplates.spstd1; - case 2: - return SP2013WebPartPageTemplates.spstd2; - case 3: - return SP2013WebPartPageTemplates.spstd3; - case 4: - return SP2013WebPartPageTemplates.spstd4; - case 5: - return SP2013WebPartPageTemplates.spstd5; - case 6: - return SP2013WebPartPageTemplates.spstd6; - case 7: - return SP2013WebPartPageTemplates.spstd7; - case 8: - return SP2013WebPartPageTemplates.spstd8; - } - - throw new Exception(string.Format("PageLayoutTemplate: [{0}] is not supported.", webPartPageModel.PageLayoutTemplate)); - } - - protected virtual string GetSP2010WebPartPageTemplateContent(WebPartPageDefinition webPartPageModel) - { - switch (webPartPageModel.PageLayoutTemplate) - { - case 1: - return SP2010WebPartPageTemplates.spstd1; - case 2: - return SP2010WebPartPageTemplates.spstd2; - case 3: - return SP2010WebPartPageTemplates.spstd3; - case 4: - return SP2010WebPartPageTemplates.spstd4; - case 5: - return SP2010WebPartPageTemplates.spstd5; - case 6: - return SP2010WebPartPageTemplates.spstd6; - case 7: - return SP2010WebPartPageTemplates.spstd7; - case 8: - return SP2010WebPartPageTemplates.spstd8; - } - - throw new Exception(string.Format("PageLayoutTemplate: [{0}] is not supported.", webPartPageModel.PageLayoutTemplate)); - } - - #endregion - } -} +using System; +using System.IO; +using System.Linq; +using Microsoft.SharePoint; +using SPMeta2.Common; +using SPMeta2.Definitions; +using SPMeta2.Definitions.Base; +using SPMeta2.ModelHandlers; +using SPMeta2.Services; +using SPMeta2.SSOM.Extensions; +using SPMeta2.Utils; +using System.Web.UI.WebControls.WebParts; +using SPMeta2.SSOM.ModelHosts; +using Microsoft.SharePoint.Utilities; +using System.Text; +using SPMeta2.Templates; + +namespace SPMeta2.SSOM.ModelHandlers +{ + public class WebPartPageModelHandler : SSOMModelHandlerBase + { + #region properties + + private const string WebPartPageCmdTemplate = + "" + + "" + + "{0}" + + "New" + + "{1}" + + "NewWebPage" + + "{2}" + + "WebPartPage" + + "{3}" + + ""; + + #endregion + + #region methods + + public override Type TargetType + { + get { return typeof(WebPartPageDefinition); } + } + + 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.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + var webpartPageModel = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + //var list = listModelHost.HostList; + var folder = folderModelHost.CurrentLibraryFolder; + + // Web part provision seems to put only the last web part on the page #869 + // https://github.com/SubPointSolutions/spmeta2/issues/869 + var targetFile = FindWebPartPage(folder, webpartPageModel); + //var targetFile = GetOrCreateNewWebPartFile(modelHost, folder, webpartPageModel); + + using (var webPartManager = targetFile.GetLimitedWebPartManager(PersonalizationScope.Shared)) + { + var webpartPageHost = new WebpartPageModelHost + { + HostFile = targetFile, + PageListItem = targetFile.Item, + SPLimitedWebPartManager = webPartManager + }; + + action(webpartPageHost); + } + } + + public override void DeployModel(object modelHost, DefinitionBase model) + { + var folderModelHost = modelHost.WithAssertAndCast("modelHost", value => value.RequireNotNull()); + var webpartPageModel = model.WithAssertAndCast("model", value => value.RequireNotNull()); + + //var list = folderModelHost.HostList; + var folder = folderModelHost.CurrentLibraryFolder; + var targetPage = GetOrCreateNewWebPartFile(modelHost, folder, webpartPageModel); + + // gosh, it really does not have a title + //targetPage[SPBuiltInFieldId.Title] = webpartPageModel.Title; + + + + //targetPage.Update(); + } + + protected SPFile FindWebPartPage(SPFolder folder, WebPartPageDefinition webpartPageModel) + { + var webPartPageName = GetSafeWebPartPageFileName(webpartPageModel); + + if (!webPartPageName.EndsWith(".aspx")) + webPartPageName += ".aspx"; + + foreach (SPFile file in folder.Files) + if (file.Name.ToUpper() == webPartPageName.ToUpper()) + return file; + + return null; + } + + protected string GetSafeWebPartPageFileName(WebPartPageDefinition webpartPageModel) + { + var webPartPageName = webpartPageModel.FileName; + + if (!webPartPageName.EndsWith(".aspx")) + webPartPageName += ".aspx"; + + return webPartPageName; + } + + private SPFile GetOrCreateNewWebPartFile(object modelHost, SPFolder folder, + WebPartPageDefinition definition) + { + var list = folder.DocumentLibrary; + var targetFile = FindWebPartPage(folder, definition); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioning, + Object = targetFile, + ObjectType = typeof(SPFile), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + if (targetFile == null || definition.NeedOverride) + { + if (definition.NeedOverride) + { + TraceService.Information((int)LogEventId.ModelProvisionProcessingExistingObject, "Processing existing web part page"); + TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "NeedOverride = true. Replacing web part page."); + } + else + { + TraceService.Information((int)LogEventId.ModelProvisionProcessingNewObject, "Processing new web part page"); + } + + var webPartPageName = GetSafeWebPartPageFileName(definition); + + byte[] fileContent = null; + + if (!string.IsNullOrEmpty(definition.CustomPageLayout)) + { + fileContent = Encoding.UTF8.GetBytes(definition.CustomPageLayout); + } + else + { + fileContent = Encoding.UTF8.GetBytes(GetWebPartPageTemplateContent(definition)); + } + + ModuleFileModelHandler.DeployModuleFile(folder, + SPUrlUtility.CombineUrl(folder.ServerRelativeUrl, webPartPageName), + webPartPageName, + fileContent, + true, + file => + { + + }, + after => + { + FieldLookupService.EnsureDefaultValues(after.ListItemAllFields, definition.DefaultValues); + + if (!string.IsNullOrEmpty(definition.ContentTypeId) || + !string.IsNullOrEmpty(definition.ContentTypeName)) + { + if (!string.IsNullOrEmpty(definition.ContentTypeId)) + after.ListItemAllFields["ContentTypeId"] = ContentTypeLookupService.LookupListContentTypeById(list, definition.ContentTypeId); + + if (!string.IsNullOrEmpty(definition.ContentTypeName)) + after.ListItemAllFields["ContentTypeId"] = ContentTypeLookupService.LookupContentTypeByName(list, definition.ContentTypeName); + } + + FieldLookupService.EnsureValues(after.ListItemAllFields, definition.Values, true); + + if (definition.DefaultValues.Any() + || definition.Values.Any() + || !string.IsNullOrEmpty(definition.ContentTypeId) + || !string.IsNullOrEmpty(definition.ContentTypeName)) + { + after.ListItemAllFields.Update(); + } + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = after, + ObjectType = typeof(SPFile), + ObjectDefinition = definition, + ModelHost = modelHost + }); + }); + + targetFile = FindWebPartPage(folder, definition); + } + else + { + FieldLookupService.EnsureDefaultValues(targetFile.ListItemAllFields, definition.DefaultValues); + + if (!string.IsNullOrEmpty(definition.ContentTypeId) || + !string.IsNullOrEmpty(definition.ContentTypeName)) + { + if (!string.IsNullOrEmpty(definition.ContentTypeId)) + targetFile.ListItemAllFields["ContentTypeId"] = ContentTypeLookupService.LookupListContentTypeById(list, definition.ContentTypeId); + + if (!string.IsNullOrEmpty(definition.ContentTypeName)) + targetFile.ListItemAllFields["ContentTypeId"] = ContentTypeLookupService.LookupContentTypeByName(list, definition.ContentTypeName); + } + + TraceService.Information((int)LogEventId.ModelProvisionProcessingExistingObject, "Processing existing web part page"); + TraceService.Verbose((int)LogEventId.ModelProvisionCoreCall, "NeedOverride = false. Skipping replacing web part page."); + + InvokeOnModelEvent(this, new ModelEventArgs + { + CurrentModelNode = null, + Model = null, + EventType = ModelEventType.OnProvisioned, + Object = targetFile, + ObjectType = typeof(SPFile), + ObjectDefinition = definition, + ModelHost = modelHost + }); + + targetFile.Update(); + } + + return targetFile; + } + + + public virtual string GetWebPartPageTemplateContent(WebPartPageDefinition webPartPageModel) + { + // TODO, add support for SP2016 + // Built-in web part page templates should be correctly resolved for SP2010/2013 #683 + + var spRuntimeVersion = typeof(SPField).Assembly.GetName().Version; + + if (spRuntimeVersion.Major == 14) + { + return GetSP2010WebPartPageTemplateContent(webPartPageModel); + } + + if (spRuntimeVersion.Major == 15) + { + return GetSP2013WebPartPageTemplateContent(webPartPageModel); + } + + throw new Exception(string.Format("PageLayoutTemplate: [{0}] is not supported.", webPartPageModel.PageLayoutTemplate)); + } + + protected virtual string GetSP2013WebPartPageTemplateContent(WebPartPageDefinition webPartPageModel) + { + switch (webPartPageModel.PageLayoutTemplate) + { + case 1: + return SP2013WebPartPageTemplates.spstd1; + case 2: + return SP2013WebPartPageTemplates.spstd2; + case 3: + return SP2013WebPartPageTemplates.spstd3; + case 4: + return SP2013WebPartPageTemplates.spstd4; + case 5: + return SP2013WebPartPageTemplates.spstd5; + case 6: + return SP2013WebPartPageTemplates.spstd6; + case 7: + return SP2013WebPartPageTemplates.spstd7; + case 8: + return SP2013WebPartPageTemplates.spstd8; + } + + throw new Exception(string.Format("PageLayoutTemplate: [{0}] is not supported.", webPartPageModel.PageLayoutTemplate)); + } + + protected virtual string GetSP2010WebPartPageTemplateContent(WebPartPageDefinition webPartPageModel) + { + switch (webPartPageModel.PageLayoutTemplate) + { + case 1: + return SP2010WebPartPageTemplates.spstd1; + case 2: + return SP2010WebPartPageTemplates.spstd2; + case 3: + return SP2010WebPartPageTemplates.spstd3; + case 4: + return SP2010WebPartPageTemplates.spstd4; + case 5: + return SP2010WebPartPageTemplates.spstd5; + case 6: + return SP2010WebPartPageTemplates.spstd6; + case 7: + return SP2010WebPartPageTemplates.spstd7; + case 8: + return SP2010WebPartPageTemplates.spstd8; + } + + throw new Exception(string.Format("PageLayoutTemplate: [{0}] is not supported.", webPartPageModel.PageLayoutTemplate)); + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/BuiltInDefinitions/BuiltInListViewDefinitions.cs b/SPMeta2/SPMeta2/BuiltInDefinitions/BuiltInListViewDefinitions.cs index 76edd2322..968dd04c8 100644 --- a/SPMeta2/SPMeta2/BuiltInDefinitions/BuiltInListViewDefinitions.cs +++ b/SPMeta2/SPMeta2/BuiltInDefinitions/BuiltInListViewDefinitions.cs @@ -25,6 +25,12 @@ public static class Libraries { Title = "All Items", Url = "AllItems.aspx" + }; + + public static ListViewDefinition AllDocuments = new ListViewDefinition + { + Title = "All Documents", + Url = "AllItems.aspx" }; public static ListViewDefinition Combine = new ListViewDefinition From 3943b37670a25c775b12c287e24f6e11a2fb8c99 Mon Sep 17 00:00:00 2001 From: "support@subpointsolutions.com" Date: Sun, 14 Aug 2016 04:33:22 -0700 Subject: [PATCH 12/12] + SPMeta2 v1.2.80, August 2016 + O365/csom Enable choosing default library/list experience #873 + 1.2.16227.1126 file version + full CSOM/SSOM regression testing --- .../Properties/AssemblyInfo.cs | 2 +- .../SPMeta2.CSOM/Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../SPMeta2.O365/Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Consts/BuiltInFeatureEnumerationTests.cs | 32 + .../Properties/AssemblyInfo.cs | 2 +- .../SPMeta2.Regression.Impl.Tests.csproj | 1 + .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../SPMeta2.SSOM/Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Enumerations/BuiltInSiteFeatures.cs | 725 ++++++++-------- .../Enumerations/BuiltInWebFeatures.cs | 812 +++++++++--------- SPMeta2/SPMeta2/Properties/AssemblyInfo.cs | 2 +- 24 files changed, 837 insertions(+), 773 deletions(-) create mode 100644 SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Consts/BuiltInFeatureEnumerationTests.cs diff --git a/SPMeta2/SPMeta2.CSOM.Standard/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.CSOM.Standard/Properties/AssemblyInfo.cs index 6d989ba06..60310b4da 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.CSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.CSOM/Properties/AssemblyInfo.cs index e2adfcef7..17889bc7d 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.Containers.CSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.CSOM/Properties/AssemblyInfo.cs index ad03d1452..33ef27e40 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.Containers.O365/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.O365/Properties/AssemblyInfo.cs index 929f83c71..3bfce7e68 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.Containers.O365v16/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.O365v16/Properties/AssemblyInfo.cs index 93ca56db7..a59dbc3c6 100644 --- a/SPMeta2/SPMeta2.Containers.O365v16/Properties/AssemblyInfo.cs +++ b/SPMeta2/SPMeta2.Containers.O365v16/Properties/AssemblyInfo.cs @@ -33,4 +33,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.2.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.Containers.SSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.SSOM/Properties/AssemblyInfo.cs index 503c443e6..cdc5f04a0 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.Containers.Standard/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers.Standard/Properties/AssemblyInfo.cs index 2f50737fc..e1e5c7247 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.Containers/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Containers/Properties/AssemblyInfo.cs index c3b22b870..ae2dfb14e 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.O365/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.O365/Properties/AssemblyInfo.cs index 3a08ba9ac..b0757ce51 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.Regression.CSOM.Standard/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.CSOM.Standard/Properties/AssemblyInfo.cs index 0d77cc0cb..fed85b30b 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.Regression.CSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.CSOM/Properties/AssemblyInfo.cs index 80ff7ff73..7ae29b1bf 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Consts/BuiltInFeatureEnumerationTests.cs b/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Consts/BuiltInFeatureEnumerationTests.cs new file mode 100644 index 000000000..5bb2fa648 --- /dev/null +++ b/SPMeta2/SPMeta2.Regression.Impl.Tests/Impl/Consts/BuiltInFeatureEnumerationTests.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using SPMeta2.Enumerations; + +namespace SPMeta2.Regression.Impl.Tests.Impl.Consts +{ + [TestClass] + public class BuiltInFeatureEnumerationTests + { + #region tests + + [TestMethod] + [TestCategory("Regression.Impl.BuiltInFeatureEnumeration")] + [TestCategory("CI.Core")] + public void Can_Create_BuiltInFeatureEnumerations() + { + // checks really silly typos in GUIDs + // static classes, so they raise an exception while acessing + + var farmFeature = BuiltInFarmFeatures.ExcelServicesApplicationViewFarmFeature; + var webAppFeature = BuiltInWebApplicationFeatures.AppsThatRequireAccessibleInternetFacingEndpoints; + var siteFeature = BuiltInSiteFeatures.BasicWebParts; + var webFeature = BuiltInWebFeatures.AccessApp; + } + + #endregion + } +} diff --git a/SPMeta2/SPMeta2.Regression.Impl.Tests/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.Impl.Tests/Properties/AssemblyInfo.cs index 54e77520e..8a424cc3c 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.Regression.Impl.Tests/SPMeta2.Regression.Impl.Tests.csproj b/SPMeta2/SPMeta2.Regression.Impl.Tests/SPMeta2.Regression.Impl.Tests.csproj index 4c8ced2d5..e84d79de3 100644 --- a/SPMeta2/SPMeta2.Regression.Impl.Tests/SPMeta2.Regression.Impl.Tests.csproj +++ b/SPMeta2/SPMeta2.Regression.Impl.Tests/SPMeta2.Regression.Impl.Tests.csproj @@ -214,6 +214,7 @@ + diff --git a/SPMeta2/SPMeta2.Regression.SSOM.Standard/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.SSOM.Standard/Properties/AssemblyInfo.cs index 6b7ebef1d..de4989351 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.Regression.SSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.SSOM/Properties/AssemblyInfo.cs index 23138b216..f17b2a8a9 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.Regression.Tests/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression.Tests/Properties/AssemblyInfo.cs index 9f6cbc7d5..7ca600983 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.Regression/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Regression/Properties/AssemblyInfo.cs index f22db4550..74c81c18b 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.16220.0718")] +[assembly: AssemblyFileVersion("1.0.16227.1126")] diff --git a/SPMeta2/SPMeta2.SSOM.Standard/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.SSOM.Standard/Properties/AssemblyInfo.cs index 91bc2c324..9d9876042 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.SSOM/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.SSOM/Properties/AssemblyInfo.cs index cc88753f6..3b17b34f4 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2.Standard/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2.Standard/Properties/AssemblyInfo.cs index fbfa536a5..03fa16e1b 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")] diff --git a/SPMeta2/SPMeta2/Enumerations/BuiltInSiteFeatures.cs b/SPMeta2/SPMeta2/Enumerations/BuiltInSiteFeatures.cs index 2df8e064a..66f2a7627 100644 --- a/SPMeta2/SPMeta2/Enumerations/BuiltInSiteFeatures.cs +++ b/SPMeta2/SPMeta2/Enumerations/BuiltInSiteFeatures.cs @@ -1,356 +1,369 @@ -using System; -using SPMeta2.Definitions; - -namespace SPMeta2.Enumerations -{ - /// - /// Out of the box SharePoint site features. - /// - public static class BuiltInSiteFeatures - { - #region custom added - - /// - /// This Feature enables developers to deploy apps under active development to a site. - /// Make sure you activate this feature only under a tenant admin for O365. - /// - public static FeatureDefinition EnableAppSideLoading = new FeatureDefinition - { - Title = "EnableAppSideLoading", - Id = new Guid("{ae3a1339-61f5-4f8f-81a7-abd2da956a7d}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Makes the following Web Parts available in the site collection Web Part catalog: Page Viewer, Content Editor, Image, Form, XML and Site Users list. - /// - public static FeatureDefinition BasicWebParts = new FeatureDefinition - { - Title = "BasicWebParts", - Id = new Guid("{00bfea71-1c5e-4a24-b310-ba51c3eb7a57}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - #endregion - - #region auto generated - - /// - /// Content Deployment Source feature enables content deployment specific checks on source site collection and enables setting up content deployment from the site collection to a target site collection. - /// - public static FeatureDefinition ContentDeploymentSourceFeature = new FeatureDefinition - { - Title = "Content Deployment Source Feature", - Id = new Guid("{cd1a49b0-c067-4fdd-adfe-69e6f5022c1a}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Provisions a site to be Enterprise Metadata hub site. - /// - public static FeatureDefinition ContentTypeSyndicationHub = new FeatureDefinition - { - Title = "Content Type Syndication Hub", - Id = new Guid("{9a447926-5937-44cb-857a-d3829301c73b}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Use the cross-farm site permissions feature to allow internal SharePoint applications to access websites across farms. - /// - public static FeatureDefinition CrossFarmSitePermissions = new FeatureDefinition - { - Title = "Cross-Farm Site Permissions", - Id = new Guid("{a5aedf1a-12e5-46b4-8348-544386d5312d}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Enables site collection to designate lists and document libraries as catalog sources for Cross-Site Collection Publishing. - /// - public static FeatureDefinition CrossSiteCollectionPublishing = new FeatureDefinition - { - Title = "Cross-Site Collection Publishing", - Id = new Guid("{151d22d9-95a8-4904-a0a3-22e4db85d1e0}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Creates a Help library that can be used to store custom help for this site collection. - /// - public static FeatureDefinition CustomSiteCollectionHelp = new FeatureDefinition - { - Title = "Custom Site Collection Help", - Id = new Guid("{57ff23fc-ec05-4dd8-b7ed-d93faa7c795d}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Manages document expiration and retention by allowing participants to decide whether to retain or delete expired documents. - /// - public static FeatureDefinition DispositionApprovalWorkflow = new FeatureDefinition - { - Title = "Disposition Approval Workflow", - Id = new Guid("{c85e5759-f323-4efb-b548-443d2216efb5}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Assigns IDs to documents in the Site Collection, which can be used to retrieve items independent of their current location. - /// - public static FeatureDefinition DocumentIDService = new FeatureDefinition - { - Title = "Document ID Service", - Id = new Guid("{b50e3104-6812-424f-a011-cc90e6327318}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Provides the content types required for creating and using document sets. Create a document set when you want to manage multiple documents as a single work product. - /// - public static FeatureDefinition DocumentSets = new FeatureDefinition - { - Title = "Document Sets", - Id = new Guid("{3bae86a2-776d-499d-9db8-fa4cdc7884f8}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Enable the definition and declaration of records in place. - /// - public static FeatureDefinition InPlaceRecordsManagement = new FeatureDefinition - { - Title = "In Place Records Management", - Id = new Guid("{da2e115b-07e4-49d9-bb2c-35e93bb9fca9}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Allows list administrators to override content type retention schedules and set schedules on libraries and folders. - /// - public static FeatureDefinition LibraryAndFolderBasedRetention = new FeatureDefinition - { - Title = "Library and Folder Based Retention", - Id = new Guid("{063c26fa-3ccc-4180-8a84-b6f98e991df3}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// When this feature is enabled, permissions for users in the "limited access" permissions level (such as Anonymous Users) are reduced, preventing access to Application Pages. - /// - public static FeatureDefinition LimitedAccessUserPermissionLockdownMode = new FeatureDefinition - { - Title = "Limited-access user permission lockdown mode", - Id = new Guid("{7c637b23-06c4-472d-9a9a-7c175762c5c4}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Configures links to documents so they open in client applications instead of Web applications, by default. - /// - public static FeatureDefinition OpenDocumentsInClientApplicationsByDefault = new FeatureDefinition - { - Title = "Open Documents in Client Applications by Default", - Id = new Guid("{8a4b8de2-6fd8-41e9-923c-c7c3c00f8295}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Features enabling the PerformancePoint Services site including content types and site definitions for this site collection. - /// - public static FeatureDefinition PerformancePointServicesSiteCollectionFeatures = new FeatureDefinition - { - Title = "PerformancePoint Services Site Collection Features", - Id = new Guid("{a1cb5b7f-e5e9-421b-915f-bf519b0760ef}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Routes a page for approval. Approvers can approve or reject the page, reassign the approval task, or request changes to the page. This workflow can be edited in SharePoint Designer. - /// - public static FeatureDefinition PublishingApprovalWorkflow = new FeatureDefinition - { - Title = "Publishing Approval Workflow", - Id = new Guid("{a44d2aa3-affc-4d58-8db4-f4a3af053188}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Creates reports about information in Microsoft SharePoint Foundation. - /// - public static FeatureDefinition Reporting = new FeatureDefinition - { - Title = "Reporting", - Id = new Guid("{7094bd89-2cfe-490a-8c7e-fbace37b4a34}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Provides content types, site columns, and library templates required to support Reports and Data Search in the Enterprise Search Center. - /// - public static FeatureDefinition ReportsAndDataSearchSupport = new FeatureDefinition - { - Title = "Reports and Data Search Support", - Id = new Guid("{b435069a-e096-46e0-ae30-899daca4b304}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// This feature improves the search engine optimization of a website by automatically generating a search engine sitemap on a recurring basis that contains all valid URLs in a SharePoint website. Anonymous access must be enabled in order to use this feature. - /// - public static FeatureDefinition SearchEngineSitemap = new FeatureDefinition - { - Title = "Search Engine Sitemap", - Id = new Guid("{77fc9e13-e99a-4bd3-9438-a3f69670ed97}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// This feature will add the Search Server Web Parts and Display Templates to your site. Search will work on most sites without this feature being activated, but if you get a message about missing templates when searching, then activate this feature. - /// - public static FeatureDefinition SearchServerWebPartsAndTemplates = new FeatureDefinition - { - Title = "Search Server Web Parts and Templates", - Id = new Guid("{9c0834e1-ba47-4d49-812b-7d4fb6fea211}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Aggregated set of out-of-box workflow features provided by SharePoint 2007. - /// - public static FeatureDefinition SharePoint2007Workflows = new FeatureDefinition - { - Title = "SharePoint 2007 Workflows", - Id = new Guid("{c845ed8d-9ce5-448c-bd3e-ea71350ce45b}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Features such as InfoPath Forms Services, Visio Services, Access Services, and Excel Services Application, included in the SharePoint Server Enterprise License. - /// - public static FeatureDefinition SharePointServerEnterpriseSiteCollectionFeatures = new FeatureDefinition - { - Title = "SharePoint Server Enterprise Site Collection features", - Id = new Guid("{8581a8a7-cf16-4770-ac54-260265ddb0b2}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Provides centralized libraries, content types, master pages and page layouts and enables page scheduling and other publishing functionality for a site collection. - /// - public static FeatureDefinition SharePointServerPublishingInfrastructure = new FeatureDefinition - { - Title = "SharePoint Server Publishing Infrastructure", - Id = new Guid("{f6924d36-2fa8-4f0b-b16d-06b7250180fa}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Features such as user profiles and search, included in the SharePoint Server Standard License. - /// - public static FeatureDefinition SharePointServerStandardSiteCollectionFeatures = new FeatureDefinition - { - Title = "SharePoint Server Standard Site Collection features", - Id = new Guid("{b21b090c-c796-4b0f-ac0f-7ef1659c20ae}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Allows site collection administrators to define retention schedules that apply to a site and all its content. - /// - public static FeatureDefinition SitePolicy = new FeatureDefinition - { - Title = "Site Policy", - Id = new Guid("{2fcd5f8a-26b7-4a6a-9755-918566dba90a}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Use this workflow to track items in a list. - /// - public static FeatureDefinition ThreeStateWorkflow = new FeatureDefinition - { - Title = "Three-state workflow", - Id = new Guid("{fde5d850-671e-4143-950a-87b473922dc7}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Provides libraries, content types, and web parts for storing, managing, and viewing rich media assets, like images, sound clips, and videos. - /// - public static FeatureDefinition VideoAndRichMedia = new FeatureDefinition - { - Title = "Video and Rich Media", - Id = new Guid("{6e1e5426-2ebd-4871-8027-c5ca86371ead}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - /// - /// Aggregated set of out-of-box workflow features provided by SharePoint. - /// - public static FeatureDefinition Workflows = new FeatureDefinition - { - Title = "Workflows", - Id = new Guid("{0af5989a-3aea-4519-8ab0-85d91abe39ff}"), - Scope = FeatureDefinitionScope.Site, - ForceActivate = false, - Enable = false - }; - - #endregion - } -} +using System; +using SPMeta2.Definitions; + +namespace SPMeta2.Enumerations +{ + /// + /// Out of the box SharePoint site features. + /// + public static class BuiltInSiteFeatures + { + #region custom added + + /// + /// This Feature enables default experience for lists or document libraries from new or classic on the site. + /// https://support.office.com/en-us/article/Switch-the-default-experience-for-lists-or-document-libraries-from-new-or-classic-66dac24b-4177-4775-bf50-3d267318caa9 + /// + public static FeatureDefinition EnableDefaultListAndLibraryExperience = new FeatureDefinition + { + Title = "EnableDefaultListLibrarExperience", + Id = new Guid("{E3540C7D-6BEA-403C-A224-1A12EAFEE4C4}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// This Feature enables developers to deploy apps under active development to a site. + /// Make sure you activate this feature only under a tenant admin for O365. + /// + public static FeatureDefinition EnableAppSideLoading = new FeatureDefinition + { + Title = "EnableAppSideLoading", + Id = new Guid("{ae3a1339-61f5-4f8f-81a7-abd2da956a7d}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Makes the following Web Parts available in the site collection Web Part catalog: Page Viewer, Content Editor, Image, Form, XML and Site Users list. + /// + public static FeatureDefinition BasicWebParts = new FeatureDefinition + { + Title = "BasicWebParts", + Id = new Guid("{00bfea71-1c5e-4a24-b310-ba51c3eb7a57}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + #endregion + + #region auto generated + + /// + /// Content Deployment Source feature enables content deployment specific checks on source site collection and enables setting up content deployment from the site collection to a target site collection. + /// + public static FeatureDefinition ContentDeploymentSourceFeature = new FeatureDefinition + { + Title = "Content Deployment Source Feature", + Id = new Guid("{cd1a49b0-c067-4fdd-adfe-69e6f5022c1a}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Provisions a site to be Enterprise Metadata hub site. + /// + public static FeatureDefinition ContentTypeSyndicationHub = new FeatureDefinition + { + Title = "Content Type Syndication Hub", + Id = new Guid("{9a447926-5937-44cb-857a-d3829301c73b}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Use the cross-farm site permissions feature to allow internal SharePoint applications to access websites across farms. + /// + public static FeatureDefinition CrossFarmSitePermissions = new FeatureDefinition + { + Title = "Cross-Farm Site Permissions", + Id = new Guid("{a5aedf1a-12e5-46b4-8348-544386d5312d}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Enables site collection to designate lists and document libraries as catalog sources for Cross-Site Collection Publishing. + /// + public static FeatureDefinition CrossSiteCollectionPublishing = new FeatureDefinition + { + Title = "Cross-Site Collection Publishing", + Id = new Guid("{151d22d9-95a8-4904-a0a3-22e4db85d1e0}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Creates a Help library that can be used to store custom help for this site collection. + /// + public static FeatureDefinition CustomSiteCollectionHelp = new FeatureDefinition + { + Title = "Custom Site Collection Help", + Id = new Guid("{57ff23fc-ec05-4dd8-b7ed-d93faa7c795d}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Manages document expiration and retention by allowing participants to decide whether to retain or delete expired documents. + /// + public static FeatureDefinition DispositionApprovalWorkflow = new FeatureDefinition + { + Title = "Disposition Approval Workflow", + Id = new Guid("{c85e5759-f323-4efb-b548-443d2216efb5}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Assigns IDs to documents in the Site Collection, which can be used to retrieve items independent of their current location. + /// + public static FeatureDefinition DocumentIDService = new FeatureDefinition + { + Title = "Document ID Service", + Id = new Guid("{b50e3104-6812-424f-a011-cc90e6327318}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Provides the content types required for creating and using document sets. Create a document set when you want to manage multiple documents as a single work product. + /// + public static FeatureDefinition DocumentSets = new FeatureDefinition + { + Title = "Document Sets", + Id = new Guid("{3bae86a2-776d-499d-9db8-fa4cdc7884f8}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Enable the definition and declaration of records in place. + /// + public static FeatureDefinition InPlaceRecordsManagement = new FeatureDefinition + { + Title = "In Place Records Management", + Id = new Guid("{da2e115b-07e4-49d9-bb2c-35e93bb9fca9}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Allows list administrators to override content type retention schedules and set schedules on libraries and folders. + /// + public static FeatureDefinition LibraryAndFolderBasedRetention = new FeatureDefinition + { + Title = "Library and Folder Based Retention", + Id = new Guid("{063c26fa-3ccc-4180-8a84-b6f98e991df3}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// When this feature is enabled, permissions for users in the "limited access" permissions level (such as Anonymous Users) are reduced, preventing access to Application Pages. + /// + public static FeatureDefinition LimitedAccessUserPermissionLockdownMode = new FeatureDefinition + { + Title = "Limited-access user permission lockdown mode", + Id = new Guid("{7c637b23-06c4-472d-9a9a-7c175762c5c4}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Configures links to documents so they open in client applications instead of Web applications, by default. + /// + public static FeatureDefinition OpenDocumentsInClientApplicationsByDefault = new FeatureDefinition + { + Title = "Open Documents in Client Applications by Default", + Id = new Guid("{8a4b8de2-6fd8-41e9-923c-c7c3c00f8295}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Features enabling the PerformancePoint Services site including content types and site definitions for this site collection. + /// + public static FeatureDefinition PerformancePointServicesSiteCollectionFeatures = new FeatureDefinition + { + Title = "PerformancePoint Services Site Collection Features", + Id = new Guid("{a1cb5b7f-e5e9-421b-915f-bf519b0760ef}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Routes a page for approval. Approvers can approve or reject the page, reassign the approval task, or request changes to the page. This workflow can be edited in SharePoint Designer. + /// + public static FeatureDefinition PublishingApprovalWorkflow = new FeatureDefinition + { + Title = "Publishing Approval Workflow", + Id = new Guid("{a44d2aa3-affc-4d58-8db4-f4a3af053188}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Creates reports about information in Microsoft SharePoint Foundation. + /// + public static FeatureDefinition Reporting = new FeatureDefinition + { + Title = "Reporting", + Id = new Guid("{7094bd89-2cfe-490a-8c7e-fbace37b4a34}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Provides content types, site columns, and library templates required to support Reports and Data Search in the Enterprise Search Center. + /// + public static FeatureDefinition ReportsAndDataSearchSupport = new FeatureDefinition + { + Title = "Reports and Data Search Support", + Id = new Guid("{b435069a-e096-46e0-ae30-899daca4b304}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// This feature improves the search engine optimization of a website by automatically generating a search engine sitemap on a recurring basis that contains all valid URLs in a SharePoint website. Anonymous access must be enabled in order to use this feature. + /// + public static FeatureDefinition SearchEngineSitemap = new FeatureDefinition + { + Title = "Search Engine Sitemap", + Id = new Guid("{77fc9e13-e99a-4bd3-9438-a3f69670ed97}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// This feature will add the Search Server Web Parts and Display Templates to your site. Search will work on most sites without this feature being activated, but if you get a message about missing templates when searching, then activate this feature. + /// + public static FeatureDefinition SearchServerWebPartsAndTemplates = new FeatureDefinition + { + Title = "Search Server Web Parts and Templates", + Id = new Guid("{9c0834e1-ba47-4d49-812b-7d4fb6fea211}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Aggregated set of out-of-box workflow features provided by SharePoint 2007. + /// + public static FeatureDefinition SharePoint2007Workflows = new FeatureDefinition + { + Title = "SharePoint 2007 Workflows", + Id = new Guid("{c845ed8d-9ce5-448c-bd3e-ea71350ce45b}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Features such as InfoPath Forms Services, Visio Services, Access Services, and Excel Services Application, included in the SharePoint Server Enterprise License. + /// + public static FeatureDefinition SharePointServerEnterpriseSiteCollectionFeatures = new FeatureDefinition + { + Title = "SharePoint Server Enterprise Site Collection features", + Id = new Guid("{8581a8a7-cf16-4770-ac54-260265ddb0b2}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Provides centralized libraries, content types, master pages and page layouts and enables page scheduling and other publishing functionality for a site collection. + /// + public static FeatureDefinition SharePointServerPublishingInfrastructure = new FeatureDefinition + { + Title = "SharePoint Server Publishing Infrastructure", + Id = new Guid("{f6924d36-2fa8-4f0b-b16d-06b7250180fa}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Features such as user profiles and search, included in the SharePoint Server Standard License. + /// + public static FeatureDefinition SharePointServerStandardSiteCollectionFeatures = new FeatureDefinition + { + Title = "SharePoint Server Standard Site Collection features", + Id = new Guid("{b21b090c-c796-4b0f-ac0f-7ef1659c20ae}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Allows site collection administrators to define retention schedules that apply to a site and all its content. + /// + public static FeatureDefinition SitePolicy = new FeatureDefinition + { + Title = "Site Policy", + Id = new Guid("{2fcd5f8a-26b7-4a6a-9755-918566dba90a}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Use this workflow to track items in a list. + /// + public static FeatureDefinition ThreeStateWorkflow = new FeatureDefinition + { + Title = "Three-state workflow", + Id = new Guid("{fde5d850-671e-4143-950a-87b473922dc7}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Provides libraries, content types, and web parts for storing, managing, and viewing rich media assets, like images, sound clips, and videos. + /// + public static FeatureDefinition VideoAndRichMedia = new FeatureDefinition + { + Title = "Video and Rich Media", + Id = new Guid("{6e1e5426-2ebd-4871-8027-c5ca86371ead}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + /// + /// Aggregated set of out-of-box workflow features provided by SharePoint. + /// + public static FeatureDefinition Workflows = new FeatureDefinition + { + Title = "Workflows", + Id = new Guid("{0af5989a-3aea-4519-8ab0-85d91abe39ff}"), + Scope = FeatureDefinitionScope.Site, + ForceActivate = false, + Enable = false + }; + + #endregion + } +} diff --git a/SPMeta2/SPMeta2/Enumerations/BuiltInWebFeatures.cs b/SPMeta2/SPMeta2/Enumerations/BuiltInWebFeatures.cs index 5fcccb890..4d652d623 100644 --- a/SPMeta2/SPMeta2/Enumerations/BuiltInWebFeatures.cs +++ b/SPMeta2/SPMeta2/Enumerations/BuiltInWebFeatures.cs @@ -1,397 +1,415 @@ -using System; -using SPMeta2.Definitions; -// ReSharper disable InconsistentNaming - -namespace SPMeta2.Enumerations -{ - /// - /// Out of the box SharePoint web features. - /// - public static class BuiltInWebFeatures - { - /// - /// Access web app. - /// - public static FeatureDefinition AccessApp = new FeatureDefinition - { - Title = "Access App", - Id = new Guid("{d2b9ec23-526b-42c5-87b6-852bd83e0364}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// BICenter Data Connections Feature - /// - public static FeatureDefinition BICenterDataConnectionsFeature = new FeatureDefinition - { - Title = "BICenter Data Connections Feature", - Id = new Guid("{3d8210e9-1e89-4f12-98ef-643995339ed4}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Adds class and group content to SharePoint My Site Host site collection. - /// - public static FeatureDefinition ClassMySiteHostContent = new FeatureDefinition - { - Title = "Class My Site Host Content", - Id = new Guid("{932f5bb1-e815-4c14-8917-c2bae32f70fe}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Adds required content types to the SharePoint Class web. - /// - public static FeatureDefinition ClassWebTypes = new FeatureDefinition - { - Title = "Class Web Types", - Id = new Guid("{a16e895c-e61a-11df-8f6e-103edfd72085}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// This feature adds community functionality such as discussion categories, content and people reputation, and the members list. It also provisions community site pages which contain these lists and features. - /// - public static FeatureDefinition CommunitySiteFeature = new FeatureDefinition - { - Title = "Community Site Feature", - Id = new Guid("{961d6a9c-4388-4cf2-9733-38ee8c89afd4}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Make the data stored in this SharePoint site available using the Content Management Interoperability Services (CMIS) standard. - /// - public static FeatureDefinition ContentManagementInteroperabilityServices_CMISProducer = new FeatureDefinition - { - Title = "Content Management Interoperability Services (CMIS) Producer", - Id = new Guid("{1fce0577-1f58-4fc2-a996-6c4bcf59eeed}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Create metadata based rules that move content submitted to this site to the correct library or folder. - /// - public static FeatureDefinition ContentOrganizer = new FeatureDefinition - { - Title = "Content Organizer", - Id = new Guid("{7ad5272a-2694-4349-953e-ea5ef290e97c}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// This feature enables Alerts and Event Receivers on the External List and External Content Types. - /// - public static FeatureDefinition ExternalSystemEvents = new FeatureDefinition - { - Title = "External System Events", - Id = new Guid("{5b10d113-2d0d-43bd-a2fd-f8bc879f5abd}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Enable users to follow documents or sites. - /// - public static FeatureDefinition FollowingContent = new FeatureDefinition - { - Title = "Following Content", - Id = new Guid("{a7a2793e-67cd-4dc1-9fd0-43f61581207a}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// - /// - public static FeatureDefinition FranchiseeEventHandlers = new FeatureDefinition - { - Title = "Franchisee EventHandlers", - Id = new Guid("{53f0c5eb-b0df-490f-a186-ad0005a945ac}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Provides a tile view experience for common SharePoint site actions. - /// - public static FeatureDefinition GettingStarted = new FeatureDefinition - { - Title = "Getting Started", - Id = new Guid("{4aec7207-0d02-4f4f-aa07-b370199cd0c7}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// This feature is used to track external actions like litigations, investigations, or audits that require you to suspend the disposition of documents. - /// - public static FeatureDefinition Hold = new FeatureDefinition - { - Title = "Hold", - Id = new Guid("{9e56487c-795a-4077-9425-54a1ecb84282}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Provides each list in the site with a settings pages for configuring that list to use metadata tree view hierarchies and filter controls to improve navigation and filtering of the contained items. - /// - public static FeatureDefinition MetadataNavigationAndFiltering = new FeatureDefinition - { - Title = "Metadata Navigation and Filtering", - Id = new Guid("{7201d6a4-a5d3-49a1-8c19-19c4bac6e668}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// A technique that delivers a faster and more fluid page navigation experience, in pages and site templates that support it, by downloading and rendering only those portions of a page that are changing. - /// - public static FeatureDefinition MinimalDownloadStrategy = new FeatureDefinition - { - Title = "Minimal Download Strategy", - Id = new Guid("{87294c72-f260-42f3-a41b-981a2ffce37a}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Provide document library and other lists in team site with mobile view for smartphone browsers. - /// - public static FeatureDefinition MobileBrowserView = new FeatureDefinition - { - Title = "Mobile Browser View", - Id = new Guid("{d95c97f3-e528-4da2-ae9f-32b3535fbb59}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Enables offline synchronization between external lists and Outlook. - /// - public static FeatureDefinition OfflineSynchronizationForExternalLists = new FeatureDefinition - { - Title = "Offline Synchronization for External Lists", - Id = new Guid("{d250636f-0a26-4019-8425-a5232d592c01}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Features enabling the PerformancePoint Services list and document library templates. - /// - public static FeatureDefinition PerformancePointServicesSiteFeatures = new FeatureDefinition - { - Title = "PerformancePoint Services Site Features", - Id = new Guid("{0b07a7f4-8bb8-4ec0-a31b-115732b9584d}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// This feature adds project management functionality to a site. It includes tasks, a calendar, and web parts on the home page of the site. - /// - public static FeatureDefinition ProjectFunctionality = new FeatureDefinition - { - Title = "Project Functionality", - Id = new Guid("{e2f2bb18-891d-4812-97df-c265afdba297}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Installs content types designed to manage search config. - /// - public static FeatureDefinition SearchConfigDataContentTypes = new FeatureDefinition - { - Title = "Search Config Data Content Types", - Id = new Guid("{48a243cb-7b16-4b5a-b1b5-07b809b43f47}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Installs columns designed to manage information about search configurations. - /// - public static FeatureDefinition SearchConfigDataSiteColumns = new FeatureDefinition - { - Title = "Search Config Data Site Columns", - Id = new Guid("{41dfb393-9eb6-4fe4-af77-28e4afce8cdc}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Create Search Config List Instance: Provisions a list to enable the import and export of search configurations - /// - public static FeatureDefinition SearchConfigListInstanceFeature = new FeatureDefinition - { - Title = "Search Config List Instance Feature", - Id = new Guid("{acb15743-f07b-4c83-8af3-ffcfdf354965}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Create Search Config Template: Provisions a template for the Search Config List to enable the import and export of search configurations - /// - public static FeatureDefinition SearchConfigTemplateFeature = new FeatureDefinition - { - Title = "Search Config Template Feature", - Id = new Guid("{e47705ec-268d-4c41-aa4e-0d8727985ebc}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Features such as Visio Services, Access Services, and Excel Services Application, included in the SharePoint Server Enterprise License. - /// - public static FeatureDefinition SharePointServerEnterpriseSiteFeatures = new FeatureDefinition - { - Title = "SharePoint Server Enterprise Site features", - Id = new Guid("{0806d127-06e6-447a-980e-2e90b03101b8}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Create a Web page library as well as supporting libraries to create and publish pages based on page layouts. - /// - public static FeatureDefinition SharePointServerPublishing = new FeatureDefinition - { - Title = "SharePoint Server Publishing", - Id = new Guid("{94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Features such as user profiles and search, included in the SharePoint Server Standard License. - /// - public static FeatureDefinition SharePointServerStandardSiteFeatures = new FeatureDefinition - { - Title = "SharePoint Server Standard Site features", - Id = new Guid("{99fe402e-89a0-45aa-9163-85342e865dc8}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Enables the use of site feeds. - /// - public static FeatureDefinition SiteFeed = new FeatureDefinition - { - Title = "Site Feed", - Id = new Guid("{15a572c6-e545-4d32-897a-bab6f5846e18}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// The Site Mailbox app helps you keep email and documents close together by connecting your site to an Exchange mailbox. You can then view your email on SharePoint, and view site documents in Outlook. - /// - public static FeatureDefinition SiteMailbox = new FeatureDefinition - { - Title = "Site Mailbox", - Id = new Guid("{502a2d54-6102-4757-aaa0-a90586106368}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Creates a Microsoft OneNote 2010 notebook in the Shared Documents library and places a link to it on the Quick Launch. This feature requires a properly configured WOPI application server to create OneNote 2010 notebooks. - /// - public static FeatureDefinition SiteNotebook = new FeatureDefinition - { - Title = "Site Notebook", - Id = new Guid("{f151bb39-7c3b-414f-bb36-6bf18872052f}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Provides team collaboration capabilities for a site by making standard lists, such as document libraries and issues, available. - /// - public static FeatureDefinition TeamCollaborationLists = new FeatureDefinition - { - Title = "Team Collaboration Lists", - Id = new Guid("{00bfea71-4ea5-48d4-a4ad-7ea5c011abe5}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// This site feature will create a wiki page and set it as your site home page. - /// - public static FeatureDefinition WikiPageHomePage = new FeatureDefinition - { - Title = "Wiki Page Home Page", - Id = new Guid("{00bfea71-d8fe-4fec-8dad-01c19a6e4053}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Allow workflows to read from and to write to all items in this site. - /// - public static FeatureDefinition WorkflowsCanUseAppPermissions = new FeatureDefinition - { - Title = "Workflows can use app permissions", - Id = new Guid("{ec918931-c874-4033-bd09-4f36b2e31fef}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - /// - /// Adds the SharePoint 2013 Workflow Task content type to the site. - /// - public static FeatureDefinition WorkflowTaskContentType = new FeatureDefinition - { - Title = "Workflow Task Content Type", - Id = new Guid("{57311b7a-9afd-4ff0-866e-9393ad6647b1}"), - Scope = FeatureDefinitionScope.Web, - ForceActivate = false, - Enable = false - }; - - } -} +using System; +using SPMeta2.Definitions; +// ReSharper disable InconsistentNaming + +namespace SPMeta2.Enumerations +{ + /// + /// Out of the box SharePoint web features. + /// + public static class BuiltInWebFeatures + { + + #region custom added + + /// + /// This Feature enables default experience for lists or document libraries from new or classic on the web. + /// https://support.office.com/en-us/article/Switch-the-default-experience-for-lists-or-document-libraries-from-new-or-classic-66dac24b-4177-4775-bf50-3d267318caa9 + /// + public static FeatureDefinition EnableDefaultListAndLibraryExperience = new FeatureDefinition + { + Title = "EnableDefaultListLibrarExperience", + Id = new Guid("{52E14B6F-B1BB-4969-B89B-C4FAA56745EF}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + #endregion + + /// + /// Access web app. + /// + public static FeatureDefinition AccessApp = new FeatureDefinition + { + Title = "Access App", + Id = new Guid("{d2b9ec23-526b-42c5-87b6-852bd83e0364}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// BICenter Data Connections Feature + /// + public static FeatureDefinition BICenterDataConnectionsFeature = new FeatureDefinition + { + Title = "BICenter Data Connections Feature", + Id = new Guid("{3d8210e9-1e89-4f12-98ef-643995339ed4}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Adds class and group content to SharePoint My Site Host site collection. + /// + public static FeatureDefinition ClassMySiteHostContent = new FeatureDefinition + { + Title = "Class My Site Host Content", + Id = new Guid("{932f5bb1-e815-4c14-8917-c2bae32f70fe}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Adds required content types to the SharePoint Class web. + /// + public static FeatureDefinition ClassWebTypes = new FeatureDefinition + { + Title = "Class Web Types", + Id = new Guid("{a16e895c-e61a-11df-8f6e-103edfd72085}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// This feature adds community functionality such as discussion categories, content and people reputation, and the members list. It also provisions community site pages which contain these lists and features. + /// + public static FeatureDefinition CommunitySiteFeature = new FeatureDefinition + { + Title = "Community Site Feature", + Id = new Guid("{961d6a9c-4388-4cf2-9733-38ee8c89afd4}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Make the data stored in this SharePoint site available using the Content Management Interoperability Services (CMIS) standard. + /// + public static FeatureDefinition ContentManagementInteroperabilityServices_CMISProducer = new FeatureDefinition + { + Title = "Content Management Interoperability Services (CMIS) Producer", + Id = new Guid("{1fce0577-1f58-4fc2-a996-6c4bcf59eeed}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Create metadata based rules that move content submitted to this site to the correct library or folder. + /// + public static FeatureDefinition ContentOrganizer = new FeatureDefinition + { + Title = "Content Organizer", + Id = new Guid("{7ad5272a-2694-4349-953e-ea5ef290e97c}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// This feature enables Alerts and Event Receivers on the External List and External Content Types. + /// + public static FeatureDefinition ExternalSystemEvents = new FeatureDefinition + { + Title = "External System Events", + Id = new Guid("{5b10d113-2d0d-43bd-a2fd-f8bc879f5abd}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Enable users to follow documents or sites. + /// + public static FeatureDefinition FollowingContent = new FeatureDefinition + { + Title = "Following Content", + Id = new Guid("{a7a2793e-67cd-4dc1-9fd0-43f61581207a}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// + /// + public static FeatureDefinition FranchiseeEventHandlers = new FeatureDefinition + { + Title = "Franchisee EventHandlers", + Id = new Guid("{53f0c5eb-b0df-490f-a186-ad0005a945ac}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Provides a tile view experience for common SharePoint site actions. + /// + public static FeatureDefinition GettingStarted = new FeatureDefinition + { + Title = "Getting Started", + Id = new Guid("{4aec7207-0d02-4f4f-aa07-b370199cd0c7}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// This feature is used to track external actions like litigations, investigations, or audits that require you to suspend the disposition of documents. + /// + public static FeatureDefinition Hold = new FeatureDefinition + { + Title = "Hold", + Id = new Guid("{9e56487c-795a-4077-9425-54a1ecb84282}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Provides each list in the site with a settings pages for configuring that list to use metadata tree view hierarchies and filter controls to improve navigation and filtering of the contained items. + /// + public static FeatureDefinition MetadataNavigationAndFiltering = new FeatureDefinition + { + Title = "Metadata Navigation and Filtering", + Id = new Guid("{7201d6a4-a5d3-49a1-8c19-19c4bac6e668}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// A technique that delivers a faster and more fluid page navigation experience, in pages and site templates that support it, by downloading and rendering only those portions of a page that are changing. + /// + public static FeatureDefinition MinimalDownloadStrategy = new FeatureDefinition + { + Title = "Minimal Download Strategy", + Id = new Guid("{87294c72-f260-42f3-a41b-981a2ffce37a}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Provide document library and other lists in team site with mobile view for smartphone browsers. + /// + public static FeatureDefinition MobileBrowserView = new FeatureDefinition + { + Title = "Mobile Browser View", + Id = new Guid("{d95c97f3-e528-4da2-ae9f-32b3535fbb59}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Enables offline synchronization between external lists and Outlook. + /// + public static FeatureDefinition OfflineSynchronizationForExternalLists = new FeatureDefinition + { + Title = "Offline Synchronization for External Lists", + Id = new Guid("{d250636f-0a26-4019-8425-a5232d592c01}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Features enabling the PerformancePoint Services list and document library templates. + /// + public static FeatureDefinition PerformancePointServicesSiteFeatures = new FeatureDefinition + { + Title = "PerformancePoint Services Site Features", + Id = new Guid("{0b07a7f4-8bb8-4ec0-a31b-115732b9584d}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// This feature adds project management functionality to a site. It includes tasks, a calendar, and web parts on the home page of the site. + /// + public static FeatureDefinition ProjectFunctionality = new FeatureDefinition + { + Title = "Project Functionality", + Id = new Guid("{e2f2bb18-891d-4812-97df-c265afdba297}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Installs content types designed to manage search config. + /// + public static FeatureDefinition SearchConfigDataContentTypes = new FeatureDefinition + { + Title = "Search Config Data Content Types", + Id = new Guid("{48a243cb-7b16-4b5a-b1b5-07b809b43f47}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Installs columns designed to manage information about search configurations. + /// + public static FeatureDefinition SearchConfigDataSiteColumns = new FeatureDefinition + { + Title = "Search Config Data Site Columns", + Id = new Guid("{41dfb393-9eb6-4fe4-af77-28e4afce8cdc}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Create Search Config List Instance: Provisions a list to enable the import and export of search configurations + /// + public static FeatureDefinition SearchConfigListInstanceFeature = new FeatureDefinition + { + Title = "Search Config List Instance Feature", + Id = new Guid("{acb15743-f07b-4c83-8af3-ffcfdf354965}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Create Search Config Template: Provisions a template for the Search Config List to enable the import and export of search configurations + /// + public static FeatureDefinition SearchConfigTemplateFeature = new FeatureDefinition + { + Title = "Search Config Template Feature", + Id = new Guid("{e47705ec-268d-4c41-aa4e-0d8727985ebc}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Features such as Visio Services, Access Services, and Excel Services Application, included in the SharePoint Server Enterprise License. + /// + public static FeatureDefinition SharePointServerEnterpriseSiteFeatures = new FeatureDefinition + { + Title = "SharePoint Server Enterprise Site features", + Id = new Guid("{0806d127-06e6-447a-980e-2e90b03101b8}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Create a Web page library as well as supporting libraries to create and publish pages based on page layouts. + /// + public static FeatureDefinition SharePointServerPublishing = new FeatureDefinition + { + Title = "SharePoint Server Publishing", + Id = new Guid("{94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Features such as user profiles and search, included in the SharePoint Server Standard License. + /// + public static FeatureDefinition SharePointServerStandardSiteFeatures = new FeatureDefinition + { + Title = "SharePoint Server Standard Site features", + Id = new Guid("{99fe402e-89a0-45aa-9163-85342e865dc8}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Enables the use of site feeds. + /// + public static FeatureDefinition SiteFeed = new FeatureDefinition + { + Title = "Site Feed", + Id = new Guid("{15a572c6-e545-4d32-897a-bab6f5846e18}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// The Site Mailbox app helps you keep email and documents close together by connecting your site to an Exchange mailbox. You can then view your email on SharePoint, and view site documents in Outlook. + /// + public static FeatureDefinition SiteMailbox = new FeatureDefinition + { + Title = "Site Mailbox", + Id = new Guid("{502a2d54-6102-4757-aaa0-a90586106368}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Creates a Microsoft OneNote 2010 notebook in the Shared Documents library and places a link to it on the Quick Launch. This feature requires a properly configured WOPI application server to create OneNote 2010 notebooks. + /// + public static FeatureDefinition SiteNotebook = new FeatureDefinition + { + Title = "Site Notebook", + Id = new Guid("{f151bb39-7c3b-414f-bb36-6bf18872052f}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Provides team collaboration capabilities for a site by making standard lists, such as document libraries and issues, available. + /// + public static FeatureDefinition TeamCollaborationLists = new FeatureDefinition + { + Title = "Team Collaboration Lists", + Id = new Guid("{00bfea71-4ea5-48d4-a4ad-7ea5c011abe5}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// This site feature will create a wiki page and set it as your site home page. + /// + public static FeatureDefinition WikiPageHomePage = new FeatureDefinition + { + Title = "Wiki Page Home Page", + Id = new Guid("{00bfea71-d8fe-4fec-8dad-01c19a6e4053}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Allow workflows to read from and to write to all items in this site. + /// + public static FeatureDefinition WorkflowsCanUseAppPermissions = new FeatureDefinition + { + Title = "Workflows can use app permissions", + Id = new Guid("{ec918931-c874-4033-bd09-4f36b2e31fef}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + /// + /// Adds the SharePoint 2013 Workflow Task content type to the site. + /// + public static FeatureDefinition WorkflowTaskContentType = new FeatureDefinition + { + Title = "Workflow Task Content Type", + Id = new Guid("{57311b7a-9afd-4ff0-866e-9393ad6647b1}"), + Scope = FeatureDefinitionScope.Web, + ForceActivate = false, + Enable = false + }; + + } +} diff --git a/SPMeta2/SPMeta2/Properties/AssemblyInfo.cs b/SPMeta2/SPMeta2/Properties/AssemblyInfo.cs index c6a009595..1f8c42a72 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.16220.0718")] +[assembly: AssemblyFileVersion("1.2.16227.1126")]