protected override void ConfigureClientOptions(BlogClientOptions clientOptions)
 {
     clientOptions.SupportsCustomDate = true;
     clientOptions.SupportsCategories = true;
     clientOptions.SupportsMultipleCategories = true;
     clientOptions.SupportsNewCategories = true;
     clientOptions.SupportsNewCategoriesInline = true;
     clientOptions.SupportsFileUpload = true;
     clientOptions.SupportsExtendedEntries = true;
 }
        public XmlRpcBlogClient(Uri postApiUrl, IBlogCredentialsAccessor credentials)
            : base(credentials)
        {
            _postApiUrl = UrlHelper.SafeToAbsoluteUri(postApiUrl);

            // configure client options
            BlogClientOptions clientOptions = new BlogClientOptions();
            ConfigureClientOptions(clientOptions);
            _clientOptions = clientOptions;

        }
Пример #3
0
        protected override void ConfigureClientOptions(OpenLiveWriter.BlogClient.Providers.BlogClientOptions clientOptions)
        {
            base.ConfigureClientOptions(clientOptions);

            clientOptions.SupportsCategories         = true;
            clientOptions.SupportsMultipleCategories = true;
            clientOptions.SupportsNewCategories      = true;
            clientOptions.SupportsCustomDate         = true;
            clientOptions.SupportsExcerpt            = true;
            clientOptions.SupportsSlug       = true;
            clientOptions.SupportsFileUpload = true;
        }
 protected override void ConfigureClientOptions(BlogClientOptions clientOptions)
 {
     clientOptions.SupportsCategories = true;
     clientOptions.SupportsMultipleCategories = true;
     clientOptions.SupportsCategoryIds = true;
     clientOptions.SupportsCategoriesInline = false;
     clientOptions.SupportsFileUpload = true;
     clientOptions.SupportsCommentPolicy = true;
     clientOptions.SupportsPingPolicy = true;
     clientOptions.SupportsTrackbacks = true;
     clientOptions.SupportsKeywords = true;
     clientOptions.SupportsExcerpt = true;
     clientOptions.SupportsExtendedEntries = true;
 }
Пример #5
0
        public AtomClient(AtomProtocolVersion atomVer, Uri postApiUrl, IBlogCredentialsAccessor credentials)
            : base(credentials)
        {
            _feedServiceUrl = postApiUrl;

            // configure client options
            BlogClientOptions clientOptions = new BlogClientOptions();
            ConfigureClientOptions(clientOptions);
            _clientOptions = clientOptions;

            _atomVer = atomVer;
            _atomNS = new Namespace(atomVer.NamespaceUri, "atom");
            _pubNS = new Namespace(atomVer.PubNamespaceUri, "app");
            _nsMgr = new XmlNamespaceManager(new NameTable());
            _nsMgr.AddNamespace(_atomNS.Prefix, _atomNS.Uri);
            _nsMgr.AddNamespace(_pubNS.Prefix, _pubNS.Uri);
            _nsMgr.AddNamespace(xhtmlNS.Prefix, xhtmlNS.Uri);
            _nsMgr.AddNamespace(featuresNS.Prefix, featuresNS.Uri);
            _nsMgr.AddNamespace(mediaNS.Prefix, mediaNS.Uri);
            _nsMgr.AddNamespace(liveNS.Prefix, liveNS.Uri);
        }
        protected override void ConfigureClientOptions(BlogClientOptions clientOptions)
        {
            // inherit mt defaults
            base.ConfigureClientOptions(clientOptions);

            // support advanced category features
            clientOptions.SupportsHierarchicalCategories = true;
            clientOptions.SupportsNewCategories = true;
            clientOptions.SupportsSuggestCategories = true;

            // don't require out-of-band categories
            clientOptions.SupportsCategoriesInline = true;

            // add support for wp-api features
            clientOptions.SupportsKeywords = true;
            clientOptions.SupportsPages = true;
            clientOptions.SupportsPageParent = true;
            clientOptions.SupportsPageOrder = true;
            clientOptions.SupportsSlug = true;
            clientOptions.SupportsPassword = true;
            clientOptions.SupportsAuthor = true;
        }
        public BlogProviderFromXml(XmlNode providerNode)
        {
            string id = NodeText(providerNode.SelectSingleNode("id"));

            if (id.Length == 0)
            {
                throw new ArgumentException("Missing Id parameter");
            }

            string name = NodeText(providerNode.SelectSingleNode("name"));

            if (name.Length == 0)
            {
                throw new ArgumentException("Missing Name parameter");
            }

            string description = NodeText(providerNode.SelectSingleNode("description"));

            string link = NodeText(providerNode.SelectSingleNode("link"));

            string clientType = NodeText(providerNode.SelectSingleNode("clientType"));

            if (clientType.Length == 0)
            {
                throw new ArgumentException("Missing ClientType parameter");
            }
            if (!BlogClientManager.IsValidClientType(clientType))
            {
                throw new ArgumentException("Invalid ClientType: " + clientType);
            }

            string postApiUrl = NodeText(providerNode.SelectSingleNode("postApiUrl"));

            if (postApiUrl.Length == 0)
            {
                throw new ArgumentException("Invalid PostApiUrl");
            }

            // visibiilty flag
            bool visible = BlogClientOptions.ReadBool(NodeText(providerNode.SelectSingleNode("visible")), true);;

            // auto-detection
            string homepageUrlPattern     = NodeText(providerNode.SelectSingleNode("homepageUrlPattern"));
            string homepageContentPattern = NodeText(providerNode.SelectSingleNode("homepageContentPattern"));
            string rsdEngineNamePattern   = NodeText(providerNode.SelectSingleNode("rsdEngineNamePattern"));
            string rsdHomepageLinkPattern = NodeText(providerNode.SelectSingleNode("rsdHomepageLinkPattern"));

            // rsd client type mappings
            ArrayList   rsdClientTypeMappings = new ArrayList();
            XmlNodeList mappingNodes          = providerNode.SelectNodes("rsdClientTypeMappings/mapping");

            foreach (XmlNode mappingNode in mappingNodes)
            {
                string rsdClientType    = NodeText(mappingNode.SelectSingleNode("@rsdClientType"));
                string writerClientType = NodeText(mappingNode.SelectSingleNode("@clientType"));
                if (rsdClientType != String.Empty && writerClientType != String.Empty)
                {
                    rsdClientTypeMappings.Add(new RsdClientTypeMapping(rsdClientType, writerClientType));
                }
            }

            // provider faults
            ArrayList   providerFaults = new ArrayList();
            XmlNodeList faultNodes     = providerNode.SelectNodes("faults/fault");

            foreach (XmlNode faultNode in faultNodes)
            {
                string codePattern   = NodeText(faultNode.SelectSingleNode("codePattern"));
                string stringPattern = NodeText(faultNode.SelectSingleNode("stringPattern"));
                string messageId     = NodeText(faultNode.SelectSingleNode("messageId"));
                if (messageId != String.Empty)
                {
                    providerFaults.Add(new ProviderFault(codePattern, stringPattern, messageId));
                }
            }

            // parse options (create generic options object to populate defaults)
            XmlNode optionsNode = providerNode.SelectSingleNode("options");

            foreach (XmlNode node in optionsNode.ChildNodes)
            {
                if (node.NodeType == XmlNodeType.Element)
                {
                    _options.Add(node.Name, node.InnerText.Trim());
                }
            }

            StringId   postApiUrlLabel           = StringId.CWSelectProviderApiUrlLabel;
            XmlElement postApiUrlDescriptionNode = providerNode.SelectSingleNode("postApiUrlLabel") as XmlElement;

            if (postApiUrlDescriptionNode != null)
            {
                try
                {
                    postApiUrlLabel = (StringId)Enum.Parse(
                        typeof(StringId),
                        "CWSelectProviderApiUrlLabel_" + postApiUrlDescriptionNode.InnerText,
                        false);
                }
                catch
                {
                    Debug.Fail("Invalid value for postApiUrlLabel");
                }
            }

            string  appid     = null;
            XmlNode appIdNode = providerNode.SelectSingleNode("appid/text()");

            if (appIdNode != null && !string.IsNullOrEmpty(appIdNode.Value))
            {
                appid = appIdNode.Value;
            }

            // initialize
            Init(id, name, description, link, clientType, postApiUrl, postApiUrlLabel, appid,
                 homepageUrlPattern, homepageContentPattern,
                 rsdClientTypeMappings.ToArray(typeof(RsdClientTypeMapping)) as RsdClientTypeMapping[],
                 rsdEngineNamePattern, rsdHomepageLinkPattern,
                 providerFaults.ToArray(typeof(ProviderFault)) as ProviderFault[],
                 visible);
        }
 public override IBlogClientOptions ConstructBlogOptions(IBlogClientOptions defaultOptions)
 {
     return(BlogClientOptions.ApplyOptionOverrides(new OptionReader(ReadProviderOption), defaultOptions));
 }
 /// <summary>
 /// Enable subclasses to change the default client options
 /// </summary>
 /// <param name="clientOptions"></param>
 protected virtual void ConfigureClientOptions(BlogClientOptions clientOptions)
 {
 }
 protected override void ConfigureClientOptions(BlogClientOptions clientOptions)
 {
     clientOptions.SupportsCategories = true;
     clientOptions.SupportsMultipleCategories = true;
     clientOptions.SupportsFileUpload = true;
 }
        public GoogleBloggerv3Client(Uri postApiUrl, IBlogCredentialsAccessor credentials)
            : base(credentials)
        {
            // configure client options
            BlogClientOptions clientOptions = new BlogClientOptions();
            clientOptions.SupportsCategories = false;
            clientOptions.SupportsMultipleCategories = false;
            clientOptions.SupportsNewCategories = false;
            clientOptions.SupportsCustomDate = true;
            clientOptions.SupportsExcerpt = false;
            clientOptions.SupportsSlug = false;
            clientOptions.SupportsFileUpload = true;
            clientOptions.SupportsKeywords = true;
            clientOptions.SupportsGetKeywords = true;
            clientOptions.SupportsPages = true;
            clientOptions.SupportsExtendedEntries = true;
            _clientOptions = clientOptions;

            _nsMgr = new XmlNamespaceManager(new NameTable());
            _nsMgr.AddNamespace(atomNS.Prefix, atomNS.Uri);
            _nsMgr.AddNamespace(pubNS.Prefix, pubNS.Uri);
            _nsMgr.AddNamespace(AtomClient.xhtmlNS.Prefix, AtomClient.xhtmlNS.Uri);
            _nsMgr.AddNamespace(AtomClient.featuresNS.Prefix, AtomClient.featuresNS.Uri);
            _nsMgr.AddNamespace(AtomClient.mediaNS.Prefix, AtomClient.mediaNS.Uri);
            _nsMgr.AddNamespace(AtomClient.liveNS.Prefix, AtomClient.liveNS.Uri);
        }
 protected override void ConfigureClientOptions(BlogClientOptions clientOptions)
 {
     clientOptions.SupportsFileUpload = true;
     clientOptions.SupportsCustomDate = false;
     clientOptions.SupportsExtendedEntries = true;
 }
Пример #13
0
        public static IBlogClientOptions ApplyOptionOverrides(OptionReader optionReader, IBlogClientOptions existingOptions, bool includeIrregularities)
        {
            BlogClientOptions clientOptions = new BlogClientOptions();

            // Protocol capabilities
            clientOptions.SupportsPostAsDraft = ReadBool(optionReader("supportsPostAsDraft"), existingOptions.SupportsPostAsDraft);
            clientOptions.SupportsFileUpload = ReadBool(optionReader("supportsFileUpload"), existingOptions.SupportsFileUpload);
            clientOptions.SupportsExtendedEntries = ReadBool(optionReader("supportsExtendedEntries"), existingOptions.SupportsExtendedEntries);
            clientOptions.SupportsCustomDate = ReadBool(optionReader("supportsCustomDate"), existingOptions.SupportsCustomDate);
            clientOptions.SupportsCustomDateUpdate = ReadBool(optionReader("supportsCustomDateUpdate"), existingOptions.SupportsCustomDateUpdate);
            clientOptions.SupportsHttps = ReadBool(optionReader("supportsHttps"), existingOptions.SupportsHttps);
            clientOptions.SupportsCategories = ReadBool(optionReader(SUPPORTS_CATEGORIES), existingOptions.SupportsCategories);
            clientOptions.SupportsCategoriesInline = ReadBool(optionReader("supportsCategoriesInline"), existingOptions.SupportsCategoriesInline);
            clientOptions.SupportsMultipleCategories = ReadBool(optionReader("supportsMultipleCategories"), existingOptions.SupportsMultipleCategories);
            clientOptions.SupportsHierarchicalCategories = ReadBool(optionReader("supportsHierarchicalCategories"), existingOptions.SupportsHierarchicalCategories);
            clientOptions.SupportsNewCategories = ReadBool(optionReader(SUPPORTS_NEW_CATEGORIES), existingOptions.SupportsNewCategories);
            clientOptions.SupportsNewCategoriesInline = ReadBool(optionReader("supportsNewCategoriesInline"), existingOptions.SupportsNewCategoriesInline);
            clientOptions.SupportsSuggestCategories = ReadBool(optionReader("supportsSuggestCategories"), existingOptions.SupportsSuggestCategories);
            clientOptions.CategoryScheme = ReadText(optionReader(CATEGORY_SCHEME), existingOptions.CategoryScheme);
            clientOptions.SupportsKeywords = ReadBool(optionReader("supportsKeywords"), existingOptions.SupportsKeywords);
            clientOptions.SupportsGetKeywords = ReadBool(optionReader("supportsGetTags"), existingOptions.SupportsGetKeywords);
            clientOptions.SupportsCommentPolicy = ReadBool(optionReader("supportsCommentPolicy"), existingOptions.SupportsCommentPolicy);
            clientOptions.SupportsPingPolicy = ReadBool(optionReader("supportsPingPolicy"), existingOptions.SupportsPingPolicy);
            clientOptions.SupportsAuthor = ReadBool(optionReader("supportsAuthor"), existingOptions.SupportsAuthor);
            clientOptions.SupportsSlug = ReadBool(optionReader("supportsSlug"), existingOptions.SupportsSlug);
            clientOptions.SupportsPassword = ReadBool(optionReader("supportsPassword"), existingOptions.SupportsPassword);
            clientOptions.SupportsExcerpt = ReadBool(optionReader("supportsExcerpt"), existingOptions.SupportsExcerpt);
            clientOptions.SupportsTrackbacks = ReadBool(optionReader("supportsTrackbacks"), existingOptions.SupportsTrackbacks);
            clientOptions.SupportsPages = ReadBool(optionReader("supportsPages"), existingOptions.SupportsPages);
            clientOptions.SupportsPageParent = ReadBool(optionReader("supportsPageParent"), existingOptions.SupportsPageParent);
            clientOptions.SupportsPageOrder = ReadBool(optionReader("supportsPageOrder"), existingOptions.SupportsPageOrder);
            clientOptions.SupportsPageTrackbacks = ReadBool(optionReader("supportsPageTrackbacks"), existingOptions.SupportsPageTrackbacks);

            // Writer capabilities
            clientOptions.LinkToSkyDriveSelfPage = ReadBool(optionReader("linkToSkyDriveSelfPage"), existingOptions.LinkToSkyDriveSelfPage);
            clientOptions.RequiresHtmlTitles = ReadBool(optionReader("requiresHtmlTitles"), existingOptions.RequiresHtmlTitles);
            clientOptions.ReturnsHtmlTitlesOnGet = ReadSupportsFeature(optionReader("returnsHtmlTitlesOnGet"), existingOptions.ReturnsHtmlTitlesOnGet);
            clientOptions.SupportsEmptyTitles = ReadBool(optionReader("supportsEmptyTitles"), existingOptions.SupportsEmptyTitles);
            clientOptions.SupportsScripts = ReadSupportsFeature(optionReader(SUPPORTS_SCRIPTS), existingOptions.SupportsScripts);
            clientOptions.SupportsEmbeds = ReadSupportsFeature(optionReader(SUPPORTS_EMBEDS), existingOptions.SupportsEmbeds);
            clientOptions.SupportsImageUpload = ReadSupportsFeature(optionReader("supportsImageUpload"), existingOptions.SupportsImageUpload);
            clientOptions.DefaultView = ReadText(optionReader("defaultView"), existingOptions.DefaultView);
            clientOptions.CharacterSet = ReadText(optionReader(CHARACTER_SET), existingOptions.CharacterSet);
            clientOptions.RequiresXHTML = ReadBool(optionReader(REQUIRES_XHTML), existingOptions.RequiresXHTML);
            clientOptions.DhtmlImageViewer = ReadText(optionReader(DHTML_IMAGE_VIEWER), existingOptions.DhtmlImageViewer);
            clientOptions.PostBodyBackgroundColor = ReadInt(optionReader(POST_BODY_BACKGROUND_COLOR), existingOptions.PostBodyBackgroundColor);
            clientOptions.MaxCategoryNameLength = ReadInt(optionReader("maxCategoryNameLength"), existingOptions.MaxCategoryNameLength);
            clientOptions.SupportsAutoUpdate = ReadBool(optionReader("supportsAutoUpdate"), existingOptions.SupportsAutoUpdate);
            clientOptions.InvalidPostIdFaultCodePattern = ReadText(optionReader("invalidPostIdFaultCodePattern"), existingOptions.InvalidPostIdFaultCodePattern);
            clientOptions.InvalidPostIdFaultStringPattern = ReadText(optionReader("invalidPostIdFaultStringPattern"), existingOptions.InvalidPostIdFaultStringPattern);
            clientOptions.IsRTLTemplate = ReadBool(optionReader("templateIsRTL"), existingOptions.IsRTLTemplate);
            clientOptions.MaxPostTitleLength = ReadInt(optionReader("maxPostTitleLength"), existingOptions.MaxPostTitleLength);

            // Weblog
            clientOptions.HomepageLinkText = ReadText(optionReader("homepageLinkText"), existingOptions.HomepageLinkText);
            clientOptions.AdminLinkText = ReadText(optionReader("adminLinkText"), existingOptions.AdminLinkText);
            clientOptions.AdminUrl = ReadText(optionReader("adminUrl"), existingOptions.AdminUrl);
            clientOptions.PostEditingUrl = ReadText(optionReader("postEditingUrl"), existingOptions.PostEditingUrl);
            clientOptions.PostEditingUrlPostIdPattern = ReadText(optionReader("postEditingUrlPostIdPattern"), existingOptions.PostEditingUrlPostIdPattern);
            clientOptions.ImagePostingUrl = ReadText(optionReader(IMAGE_ENDPOINT), existingOptions.ImagePostingUrl);
            clientOptions.ServiceName = ReadText(optionReader("serviceName"), existingOptions.ServiceName);

            // Irregularities
            if (includeIrregularities)
            {
                clientOptions.CommentPolicyAsBoolean = ReadBool(optionReader("commentPolicyAsBoolean"), existingOptions.CommentPolicyAsBoolean);
                clientOptions.AllowPolicyFalseValue = ReadInt(optionReader("allowPolicyFalseValue"), existingOptions.AllowPolicyFalseValue);
                clientOptions.MaxRecentPosts = ReadInt(optionReader("maxRecentPosts"), existingOptions.MaxRecentPosts);
                clientOptions.ContentFilter = ReadText(optionReader("contentFilter"), existingOptions.ContentFilter);
                clientOptions.PermalinkFormat = ReadText(optionReader("permalinkFormat"), existingOptions.PermalinkFormat);
                clientOptions.PostDateFormat = ReadText(optionReader("postDateFormat"), existingOptions.PostDateFormat);
                clientOptions.FileUploadNameFormat = ReadText(optionReader("fileUploadNameFormat"), existingOptions.FileUploadNameFormat);
                clientOptions.UseLocalTime = ReadBool(optionReader("useLocalTime"), existingOptions.UseLocalTime);
                clientOptions.SupportsPostSynchronization = ReadBool(optionReader("supportsPostSynchronization"), existingOptions.SupportsPostSynchronization);
                clientOptions.TrackbackDelimiter = ReadTrackbackDelimiter(optionReader("trackbackDelimiter"), existingOptions.TrackbackDelimiter);
                clientOptions.FuturePublishDateWarning = ReadBool(optionReader("futurePublishDateWarning"), existingOptions.FuturePublishDateWarning);
                clientOptions.UsePicasaImgMaxAlways = ReadBool(optionReader("usePicasaImgMaxAlways"), existingOptions.UsePicasaImgMaxAlways);
                clientOptions.UsePicasaS1600h = ReadBool(optionReader("usePicasaS1600h"), existingOptions.UsePicasaS1600h);
                clientOptions.KeywordsAsTags = ReadBool(optionReader("keywordsAsTags"), existingOptions.KeywordsAsTags);
            }
            else
            {
                clientOptions.CommentPolicyAsBoolean = existingOptions.CommentPolicyAsBoolean;
                clientOptions.AllowPolicyFalseValue = existingOptions.AllowPolicyFalseValue;
                clientOptions.MaxRecentPosts = existingOptions.MaxRecentPosts;
                clientOptions.ContentFilter = existingOptions.ContentFilter;
                clientOptions.PermalinkFormat = existingOptions.PermalinkFormat;
                clientOptions.PostDateFormat = existingOptions.PostDateFormat;
                clientOptions.FileUploadNameFormat = existingOptions.FileUploadNameFormat;
                clientOptions.UseLocalTime = existingOptions.UseLocalTime;
                clientOptions.SupportsPostSynchronization = existingOptions.SupportsPostSynchronization;
                clientOptions.TrackbackDelimiter = existingOptions.TrackbackDelimiter;
                clientOptions.FuturePublishDateWarning = existingOptions.FuturePublishDateWarning;
                clientOptions.UsePicasaImgMaxAlways = existingOptions.UsePicasaImgMaxAlways;
                clientOptions.UsePicasaS1600h = existingOptions.UsePicasaS1600h;
                clientOptions.KeywordsAsTags = existingOptions.KeywordsAsTags;
            }

            // return options
            return clientOptions;
        }
Пример #14
0
        public static IBlogClientOptions ApplyOptionOverrides(OptionReader optionReader, IBlogClientOptions existingOptions, bool includeIrregularities)
        {
            BlogClientOptions clientOptions = new BlogClientOptions();

            // Protocol capabilities
            clientOptions.SupportsPostAsDraft            = ReadBool(optionReader("supportsPostAsDraft"), existingOptions.SupportsPostAsDraft);
            clientOptions.SupportsFileUpload             = ReadBool(optionReader("supportsFileUpload"), existingOptions.SupportsFileUpload);
            clientOptions.SupportsExtendedEntries        = ReadBool(optionReader("supportsExtendedEntries"), existingOptions.SupportsExtendedEntries);
            clientOptions.SupportsCustomDate             = ReadBool(optionReader("supportsCustomDate"), existingOptions.SupportsCustomDate);
            clientOptions.SupportsCustomDateUpdate       = ReadBool(optionReader("supportsCustomDateUpdate"), existingOptions.SupportsCustomDateUpdate);
            clientOptions.SupportsHttps                  = ReadBool(optionReader("supportsHttps"), existingOptions.SupportsHttps);
            clientOptions.SupportsCategories             = ReadBool(optionReader(SUPPORTS_CATEGORIES), existingOptions.SupportsCategories);
            clientOptions.SupportsCategoriesInline       = ReadBool(optionReader("supportsCategoriesInline"), existingOptions.SupportsCategoriesInline);
            clientOptions.SupportsMultipleCategories     = ReadBool(optionReader("supportsMultipleCategories"), existingOptions.SupportsMultipleCategories);
            clientOptions.SupportsHierarchicalCategories = ReadBool(optionReader("supportsHierarchicalCategories"), existingOptions.SupportsHierarchicalCategories);
            clientOptions.SupportsNewCategories          = ReadBool(optionReader(SUPPORTS_NEW_CATEGORIES), existingOptions.SupportsNewCategories);
            clientOptions.SupportsNewCategoriesInline    = ReadBool(optionReader("supportsNewCategoriesInline"), existingOptions.SupportsNewCategoriesInline);
            clientOptions.SupportsSuggestCategories      = ReadBool(optionReader("supportsSuggestCategories"), existingOptions.SupportsSuggestCategories);
            clientOptions.CategoryScheme                 = ReadText(optionReader(CATEGORY_SCHEME), existingOptions.CategoryScheme);
            clientOptions.SupportsKeywords               = ReadBool(optionReader("supportsKeywords"), existingOptions.SupportsKeywords);
            clientOptions.SupportsGetKeywords            = ReadBool(optionReader("supportsGetTags"), existingOptions.SupportsGetKeywords);
            clientOptions.SupportsCommentPolicy          = ReadBool(optionReader("supportsCommentPolicy"), existingOptions.SupportsCommentPolicy);
            clientOptions.SupportsPingPolicy             = ReadBool(optionReader("supportsPingPolicy"), existingOptions.SupportsPingPolicy);
            clientOptions.SupportsAuthor                 = ReadBool(optionReader("supportsAuthor"), existingOptions.SupportsAuthor);
            clientOptions.SupportsSlug           = ReadBool(optionReader("supportsSlug"), existingOptions.SupportsSlug);
            clientOptions.SupportsPassword       = ReadBool(optionReader("supportsPassword"), existingOptions.SupportsPassword);
            clientOptions.SupportsExcerpt        = ReadBool(optionReader("supportsExcerpt"), existingOptions.SupportsExcerpt);
            clientOptions.SupportsTrackbacks     = ReadBool(optionReader("supportsTrackbacks"), existingOptions.SupportsTrackbacks);
            clientOptions.SupportsPages          = ReadBool(optionReader("supportsPages"), existingOptions.SupportsPages);
            clientOptions.SupportsPageParent     = ReadBool(optionReader("supportsPageParent"), existingOptions.SupportsPageParent);
            clientOptions.SupportsPageOrder      = ReadBool(optionReader("supportsPageOrder"), existingOptions.SupportsPageOrder);
            clientOptions.SupportsPageTrackbacks = ReadBool(optionReader("supportsPageTrackbacks"), existingOptions.SupportsPageTrackbacks);

            // Writer capabilities
            clientOptions.LinkToSkyDriveSelfPage          = ReadBool(optionReader("linkToSkyDriveSelfPage"), existingOptions.LinkToSkyDriveSelfPage);
            clientOptions.RequiresHtmlTitles              = ReadBool(optionReader("requiresHtmlTitles"), existingOptions.RequiresHtmlTitles);
            clientOptions.ReturnsHtmlTitlesOnGet          = ReadSupportsFeature(optionReader("returnsHtmlTitlesOnGet"), existingOptions.ReturnsHtmlTitlesOnGet);
            clientOptions.SupportsEmptyTitles             = ReadBool(optionReader("supportsEmptyTitles"), existingOptions.SupportsEmptyTitles);
            clientOptions.SupportsScripts                 = ReadSupportsFeature(optionReader(SUPPORTS_SCRIPTS), existingOptions.SupportsScripts);
            clientOptions.SupportsEmbeds                  = ReadSupportsFeature(optionReader(SUPPORTS_EMBEDS), existingOptions.SupportsEmbeds);
            clientOptions.SupportsImageUpload             = ReadSupportsFeature(optionReader("supportsImageUpload"), existingOptions.SupportsImageUpload);
            clientOptions.DefaultView                     = ReadText(optionReader("defaultView"), existingOptions.DefaultView);
            clientOptions.CharacterSet                    = ReadText(optionReader(CHARACTER_SET), existingOptions.CharacterSet);
            clientOptions.RequiresXHTML                   = ReadBool(optionReader(REQUIRES_XHTML), existingOptions.RequiresXHTML);
            clientOptions.DhtmlImageViewer                = ReadText(optionReader(DHTML_IMAGE_VIEWER), existingOptions.DhtmlImageViewer);
            clientOptions.PostBodyBackgroundColor         = ReadInt(optionReader(POST_BODY_BACKGROUND_COLOR), existingOptions.PostBodyBackgroundColor);
            clientOptions.MaxCategoryNameLength           = ReadInt(optionReader("maxCategoryNameLength"), existingOptions.MaxCategoryNameLength);
            clientOptions.SupportsAutoUpdate              = ReadBool(optionReader("supportsAutoUpdate"), existingOptions.SupportsAutoUpdate);
            clientOptions.InvalidPostIdFaultCodePattern   = ReadText(optionReader("invalidPostIdFaultCodePattern"), existingOptions.InvalidPostIdFaultCodePattern);
            clientOptions.InvalidPostIdFaultStringPattern = ReadText(optionReader("invalidPostIdFaultStringPattern"), existingOptions.InvalidPostIdFaultStringPattern);
            clientOptions.IsRTLTemplate                   = ReadBool(optionReader("templateIsRTL"), existingOptions.IsRTLTemplate);
            clientOptions.MaxPostTitleLength              = ReadInt(optionReader("maxPostTitleLength"), existingOptions.MaxPostTitleLength);

            // Weblog
            clientOptions.HomepageLinkText            = ReadText(optionReader("homepageLinkText"), existingOptions.HomepageLinkText);
            clientOptions.AdminLinkText               = ReadText(optionReader("adminLinkText"), existingOptions.AdminLinkText);
            clientOptions.AdminUrl                    = ReadText(optionReader("adminUrl"), existingOptions.AdminUrl);
            clientOptions.PostEditingUrl              = ReadText(optionReader("postEditingUrl"), existingOptions.PostEditingUrl);
            clientOptions.PostEditingUrlPostIdPattern = ReadText(optionReader("postEditingUrlPostIdPattern"), existingOptions.PostEditingUrlPostIdPattern);
            clientOptions.ImagePostingUrl             = ReadText(optionReader(IMAGE_ENDPOINT), existingOptions.ImagePostingUrl);
            clientOptions.ServiceName                 = ReadText(optionReader("serviceName"), existingOptions.ServiceName);

            // Irregularities
            if (includeIrregularities)
            {
                clientOptions.CommentPolicyAsBoolean      = ReadBool(optionReader("commentPolicyAsBoolean"), existingOptions.CommentPolicyAsBoolean);
                clientOptions.AllowPolicyFalseValue       = ReadInt(optionReader("allowPolicyFalseValue"), existingOptions.AllowPolicyFalseValue);
                clientOptions.MaxRecentPosts              = ReadInt(optionReader("maxRecentPosts"), existingOptions.MaxRecentPosts);
                clientOptions.ContentFilter               = ReadText(optionReader("contentFilter"), existingOptions.ContentFilter);
                clientOptions.PermalinkFormat             = ReadText(optionReader("permalinkFormat"), existingOptions.PermalinkFormat);
                clientOptions.PostDateFormat              = ReadText(optionReader("postDateFormat"), existingOptions.PostDateFormat);
                clientOptions.FileUploadNameFormat        = ReadText(optionReader("fileUploadNameFormat"), existingOptions.FileUploadNameFormat);
                clientOptions.UseLocalTime                = ReadBool(optionReader("useLocalTime"), existingOptions.UseLocalTime);
                clientOptions.SupportsPostSynchronization = ReadBool(optionReader("supportsPostSynchronization"), existingOptions.SupportsPostSynchronization);
                clientOptions.TrackbackDelimiter          = ReadTrackbackDelimiter(optionReader("trackbackDelimiter"), existingOptions.TrackbackDelimiter);
                clientOptions.FuturePublishDateWarning    = ReadBool(optionReader("futurePublishDateWarning"), existingOptions.FuturePublishDateWarning);
                clientOptions.UsePicasaImgMaxAlways       = ReadBool(optionReader("usePicasaImgMaxAlways"), existingOptions.UsePicasaImgMaxAlways);
                clientOptions.UsePicasaS1600h             = ReadBool(optionReader("usePicasaS1600h"), existingOptions.UsePicasaS1600h);
                clientOptions.KeywordsAsTags              = ReadBool(optionReader("keywordsAsTags"), existingOptions.KeywordsAsTags);
            }
            else
            {
                clientOptions.CommentPolicyAsBoolean      = existingOptions.CommentPolicyAsBoolean;
                clientOptions.AllowPolicyFalseValue       = existingOptions.AllowPolicyFalseValue;
                clientOptions.MaxRecentPosts              = existingOptions.MaxRecentPosts;
                clientOptions.ContentFilter               = existingOptions.ContentFilter;
                clientOptions.PermalinkFormat             = existingOptions.PermalinkFormat;
                clientOptions.PostDateFormat              = existingOptions.PostDateFormat;
                clientOptions.FileUploadNameFormat        = existingOptions.FileUploadNameFormat;
                clientOptions.UseLocalTime                = existingOptions.UseLocalTime;
                clientOptions.SupportsPostSynchronization = existingOptions.SupportsPostSynchronization;
                clientOptions.TrackbackDelimiter          = existingOptions.TrackbackDelimiter;
                clientOptions.FuturePublishDateWarning    = existingOptions.FuturePublishDateWarning;
                clientOptions.UsePicasaImgMaxAlways       = existingOptions.UsePicasaImgMaxAlways;
                clientOptions.UsePicasaS1600h             = existingOptions.UsePicasaS1600h;
                clientOptions.KeywordsAsTags              = existingOptions.KeywordsAsTags;
            }

            // return options
            return(clientOptions);
        }