コード例 #1
0
ファイル: PageExtensions.cs プロジェクト: zach88/BetterCMS
        public static PutPagePropertiesRequest ToPutRequest(this GetPagePropertiesResponse response)
        {
            var model = MapPageModel(response);

            return(new PutPagePropertiesRequest {
                Data = model, Id = response.Data.Id
            });
        }
コード例 #2
0
ファイル: PageExtensions.cs プロジェクト: zach88/BetterCMS
        public static PostPagePropertiesRequest ToPostRequest(this GetPagePropertiesResponse response)
        {
            var model = MapPageModel(response);

            return(new PostPagePropertiesRequest {
                Data = model
            });
        }
        public static GetPagePropertiesResponse Unmarshall(UnmarshallerContext context)
        {
            GetPagePropertiesResponse getPagePropertiesResponse = new GetPagePropertiesResponse();

            getPagePropertiesResponse.HttpResponse = context.HttpResponse;
            getPagePropertiesResponse.RequestId    = context.StringValue("GetPageProperties.RequestId");
            getPagePropertiesResponse.Success      = context.BooleanValue("GetPageProperties.Success");
            getPagePropertiesResponse.Message      = context.StringValue("GetPageProperties.Message");
            getPagePropertiesResponse.Data         = context.StringValue("GetPageProperties.Data");
            getPagePropertiesResponse.ErrorCode    = context.IntegerValue("GetPageProperties.ErrorCode");
            getPagePropertiesResponse.ErrorMsg     = context.StringValue("GetPageProperties.ErrorMsg");

            return(getPagePropertiesResponse);
        }
コード例 #4
0
ファイル: PageExtensions.cs プロジェクト: wezmag/BetterCMS
        private static SavePagePropertiesModel MapPageModel(GetPagePropertiesResponse response)
        {
            var model = new SavePagePropertiesModel
            {
                Version = response.Data.Version,
                PageUrl = response.Data.PageUrl,
                Title = response.Data.Title,
                Description = response.Data.Description,
                IsPublished = response.Data.IsPublished,
                PublishedOn = response.Data.PublishedOn,
                LayoutId = response.Data.LayoutId,
                MasterPageId = response.Data.MasterPageId,
                Categories = response.Data.Categories,
                IsArchived = response.Data.IsArchived,
                MainImageId = response.Data.MainImageId,
                FeaturedImageId = response.Data.FeaturedImageId,
                SecondaryImageId = response.Data.SecondaryImageId,
                CustomCss = response.Data.CustomCss,
                CustomJavaScript = response.Data.CustomJavaScript,
                UseCanonicalUrl = response.Data.UseCanonicalUrl,
                UseNoFollow = response.Data.UseNoFollow,
                UseNoIndex = response.Data.UseNoIndex,
                IsMasterPage = response.Data.IsMasterPage,
                LanguageId = response.Data.LanguageId,
                LanguageGroupIdentifier = response.Data.LanguageGroupIdentifier,
                ForceAccessProtocol = response.Data.ForceAccessProtocol,
                MetaData = response.MetaData,
                AccessRules = response.AccessRules,
                PageOptions = response.PageOptions,
            };

            if (response.Tags != null)
            {
                model.Tags = response.Tags.Select(t => t.Name).ToList();
            }

            return model;
        }
コード例 #5
0
ファイル: PageExtensions.cs プロジェクト: zach88/BetterCMS
        private static SavePagePropertiesModel MapPageModel(GetPagePropertiesResponse response)
        {
            var model = new SavePagePropertiesModel
            {
                Version                 = response.Data.Version,
                PageUrl                 = response.Data.PageUrl,
                Title                   = response.Data.Title,
                Description             = response.Data.Description,
                IsPublished             = response.Data.IsPublished,
                PublishedOn             = response.Data.PublishedOn,
                LayoutId                = response.Data.LayoutId,
                MasterPageId            = response.Data.MasterPageId,
                Categories              = response.Data.Categories,
                IsArchived              = response.Data.IsArchived,
                MainImageId             = response.Data.MainImageId,
                FeaturedImageId         = response.Data.FeaturedImageId,
                SecondaryImageId        = response.Data.SecondaryImageId,
                CustomCss               = response.Data.CustomCss,
                CustomJavaScript        = response.Data.CustomJavaScript,
                UseCanonicalUrl         = response.Data.UseCanonicalUrl,
                UseNoFollow             = response.Data.UseNoFollow,
                UseNoIndex              = response.Data.UseNoIndex,
                IsMasterPage            = response.Data.IsMasterPage,
                LanguageId              = response.Data.LanguageId,
                LanguageGroupIdentifier = response.Data.LanguageGroupIdentifier,
                ForceAccessProtocol     = response.Data.ForceAccessProtocol,
                MetaData                = response.MetaData,
                AccessRules             = response.AccessRules,
                PageOptions             = response.PageOptions,
            };

            if (response.Tags != null)
            {
                model.Tags = response.Tags.Select(t => t.Name).ToList();
            }

            return(model);
        }