Exemplo n.º 1
0
        protected override void ExecuteCmdlet()
        {
            switch (ParameterSetName)
            {
            case "WithContent":
            {
                CurrentWeb.AddWikiPageByUrl(ServerRelativePageUrl, Content);
                break;
            }

            case "WithLayout":
            {
                CurrentWeb.AddWikiPageByUrl(ServerRelativePageUrl);
                CurrentWeb.AddLayoutToWikiPage(Layout, ServerRelativePageUrl);
                break;
            }

            default:
            {
                CurrentWeb.AddWikiPageByUrl(ServerRelativePageUrl);
                break;
            }
            }
        }