コード例 #1
0
 /// <summary>
 /// Save front matter keys configuration to blog credentials
 /// </summary>
 /// <param name="creds">An IBlogCredentialsAccessor</param>
 public void SaveToCredentials(IBlogCredentialsAccessor creds)
 {
     creds.SetCustomValue(CONFIG_ID_KEY, IdKey);
     creds.SetCustomValue(CONFIG_TITLE_KEY, TitleKey);
     creds.SetCustomValue(CONFIG_DATE_KEY, DateKey);
     creds.SetCustomValue(CONFIG_LAYOUT_KEY, LayoutKey);
     creds.SetCustomValue(CONFIG_TAGS_KEY, TagsKey);
     creds.SetCustomValue(CONFIG_PARENT_ID_KEY, ParentIdKey);
     creds.SetCustomValue(CONFIG_PERMALINK_KEY, PermalinkKey);
 }
コード例 #2
0
        /// <summary>
        /// Saves site configuration to blog credentials
        /// </summary>
        public void SaveToCredentials(IBlogCredentialsAccessor creds)
        {
            // Set username to Local Site Path
            creds.Username = LocalSitePath;
            creds.SetCustomValue(CONFIG_POSTS_PATH, PostsPath);

            creds.SetCustomValue(CONFIG_PAGES_ENABLED, PagesEnabled ? "1" : "0");
            creds.SetCustomValue(CONFIG_PAGES_PATH, PagesPath);

            creds.SetCustomValue(CONFIG_DRAFTS_ENABLED, DraftsEnabled ? "1" : "0");
            creds.SetCustomValue(CONFIG_DRAFTS_PATH, DraftsPath);

            creds.SetCustomValue(CONFIG_IMAGES_ENABLED, ImagesEnabled ? "1" : "0");
            creds.SetCustomValue(CONFIG_IMAGES_PATH, ImagesPath);

            creds.SetCustomValue(CONFIG_BUILDING_ENABLED, BuildingEnabled ? "1" : "0");
            creds.SetCustomValue(CONFIG_OUTPUT_PATH, OutputPath);
            creds.SetCustomValue(CONFIG_BUILD_COMMAND, BuildCommand);

            creds.SetCustomValue(CONFIG_PUBLISH_COMMAND, PublishCommand);
            creds.SetCustomValue(CONFIG_SITE_URL, SiteUrl);

            creds.SetCustomValue(CONFIG_SHOW_CMD_WINDOWS, ShowCmdWindows ? "1" : "0");
            creds.SetCustomValue(CONFIG_CMD_TIMEOUT_MS, CmdTimeoutMs.ToString());
            creds.SetCustomValue(CONFIG_INITIALISED, Initialised ? "1" : "0");

            // Save FrontMatterKeys
            FrontMatterKeys.SaveToCredentials(creds);
        }