Skip to content

Commit 9a10260

Browse files
committed
Small tweaks
1 parent 6aff73c commit 9a10260

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Odotocodot.OneNote.Linq/OneNoteParser.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public static string GetPageContent(IApplication oneNote, OneNotePage page)
339339
/// <param name="notebook">The specified OneNote notebook.</param>
340340
public static void CloseNotebook(IApplication oneNote, OneNoteNotebook notebook) => oneNote.CloseNotebook(notebook.ID);
341341

342-
//TODO: Rename item
342+
//TODO: Works but UpdateHierarchy takes A LONG TIME!
343343
internal static void RenameItem(IApplication oneNote, IOneNoteItem item, string newName)
344344
{
345345
if (item.IsInRecycleBin())
@@ -423,22 +423,22 @@ private static void CreateItemBase<T>(IApplication oneNote, IOneNoteItem parent,
423423
{
424424
case nameof(OneNoteNotebook):
425425
if (!IsNotebookNameValid(name))
426-
throw new ArgumentException($"Invalid notebook name provided: \"{name}\". Notebook names cannot empty, only white space or contain the symbols: \n {string.Join(' ', InvalidNotebookChars)}");
426+
throw new ArgumentException($"Invalid notebook name provided: \"{name}\". Notebook names cannot empty, only whitespace or contain the symbols: \n {string.Join(' ', InvalidNotebookChars)}");
427427

428428
path = Path.Combine(GetDefaultNotebookLocation(oneNote), name);
429429
createFileType = CreateFileType.cftNotebook;
430430
break;
431431
case nameof(OneNoteSectionGroup):
432432
if (!IsSectionGroupNameValid(name))
433-
throw new ArgumentException($"Invalid section group name provided: \"{name}\". Section group names cannot empty, only white space or contain the symbols: \n {string.Join(' ', InvalidSectionGroupChars)}");
433+
throw new ArgumentException($"Invalid section group name provided: \"{name}\". Section group names cannot empty, only whitespace or contain the symbols: \n {string.Join(' ', InvalidSectionGroupChars)}");
434434

435435
path = name;
436436
createFileType = CreateFileType.cftFolder;
437437

438438
break;
439439
case nameof(OneNoteSection):
440440
if (!IsSectionNameValid(name))
441-
throw new ArgumentException($"Invalid section name provided: \"{name}\". Section names cannot empty, only white space or contain the symbols: \n {string.Join(' ', InvalidSectionChars)}");
441+
throw new ArgumentException($"Invalid section name provided: \"{name}\". Section names cannot empty, only whitespace or contain the symbols: \n {string.Join(' ', InvalidSectionChars)}");
442442

443443
path = name + ".one";
444444
createFileType = CreateFileType.cftSection;
@@ -517,7 +517,7 @@ public static void CreateNotebook(IApplication oneNote, string name, bool openIm
517517
/// Returns a value that indicates whether the supplied <paramref name="name"/> is a valid for a notebook.
518518
/// </summary>
519519
/// <param name="name"></param>
520-
/// <returns><see langword="true"/> if the specified <paramref name="name"/> is not null, empty, white space or contains any characters from <see cref="InvalidNotebookChars"/>; otherwise, <see langword="false"/>.</returns>
520+
/// <returns><see langword="true"/> if the specified <paramref name="name"/> is not null, empty, whitespace or contains any characters from <see cref="InvalidNotebookChars"/>; otherwise, <see langword="false"/>.</returns>
521521
/// <seealso cref="InvalidNotebookChars"/>
522522
public static bool IsNotebookNameValid(string name)
523523
=> !string.IsNullOrWhiteSpace(name) && !InvalidNotebookChars.Any(name.Contains);
@@ -526,15 +526,15 @@ public static bool IsNotebookNameValid(string name)
526526
/// Returns a value that indicates whether the supplied <paramref name="name"/> is a valid for a section.
527527
/// </summary>
528528
/// <param name="name"></param>
529-
/// <returns><see langword="true"/> if the specified <paramref name="name"/> is not null, empty, white space or contains any characters from <see cref="InvalidSectionChars"/>; otherwise, <see langword="false"/>.</returns>
529+
/// <returns><see langword="true"/> if the specified <paramref name="name"/> is not null, empty, whitespace or contains any characters from <see cref="InvalidSectionChars"/>; otherwise, <see langword="false"/>.</returns>
530530
/// <seealso cref="InvalidSectionChars"/>
531531
public static bool IsSectionNameValid(string name)
532532
=> !string.IsNullOrWhiteSpace(name) && !InvalidSectionChars.Any(name.Contains);
533533

534534
/// <summary>
535535
/// Returns a value that indicates whether the supplied <paramref name="name"/> is a valid for a section group.
536536
/// </summary>
537-
/// <returns><see langword="true"/> if the specified <paramref name="name"/> is not null, empty, white space or contains any characters from <see cref="InvalidSectionGroupChars"/>; otherwise, <see langword="false"/>.</returns>
537+
/// <returns><see langword="true"/> if the specified <paramref name="name"/> is not null, empty, whitespace or contains any characters from <see cref="InvalidSectionGroupChars"/>; otherwise, <see langword="false"/>.</returns>
538538
/// <param name="name"></param>
539539
/// <seealso cref="InvalidSectionGroupChars"/>
540540
public static bool IsSectionGroupNameValid(string name)

0 commit comments

Comments
 (0)