diff --git a/NuGet.config b/NuGet.config new file mode 100644 index 00000000..f05fa413 --- /dev/null +++ b/NuGet.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/intl/markets/ar-SA/market.xml b/intl/markets/ar-SA/market.xml index e4cd63ba..85c18657 100644 --- a/intl/markets/ar-SA/market.xml +++ b/intl/markets/ar-SA/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/bg-BG/market.xml b/intl/markets/bg-BG/market.xml index 1539113b..d32a5d38 100644 --- a/intl/markets/bg-BG/market.xml +++ b/intl/markets/bg-BG/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/bs-Latn-BA/market.xml b/intl/markets/bs-Latn-BA/market.xml index 2b9b6497..22b3c573 100644 --- a/intl/markets/bs-Latn-BA/market.xml +++ b/intl/markets/bs-Latn-BA/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/ca-es/market.xml b/intl/markets/ca-es/market.xml index 2662404c..e4d89984 100644 --- a/intl/markets/ca-es/market.xml +++ b/intl/markets/ca-es/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/cs-CZ/market.xml b/intl/markets/cs-CZ/market.xml index c9a4d8ab..80848cad 100644 --- a/intl/markets/cs-CZ/market.xml +++ b/intl/markets/cs-CZ/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/cy-GB/market.xml b/intl/markets/cy-GB/market.xml index fec53b56..a7b7f59e 100644 --- a/intl/markets/cy-GB/market.xml +++ b/intl/markets/cy-GB/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/da-DK/market.xml b/intl/markets/da-DK/market.xml index 2eb0af6e..8eca400a 100644 --- a/intl/markets/da-DK/market.xml +++ b/intl/markets/da-DK/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/de-DE/market.xml b/intl/markets/de-DE/market.xml index 793e2e75..2692d6e1 100644 --- a/intl/markets/de-DE/market.xml +++ b/intl/markets/de-DE/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/el-GR/market.xml b/intl/markets/el-GR/market.xml index 002a3993..bb8e6370 100644 --- a/intl/markets/el-GR/market.xml +++ b/intl/markets/el-GR/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/en-GB/market.xml b/intl/markets/en-GB/market.xml index 31817bec..856b38a0 100644 --- a/intl/markets/en-GB/market.xml +++ b/intl/markets/en-GB/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/en-US/market.xml b/intl/markets/en-US/market.xml index a217764c..c932d5c6 100644 --- a/intl/markets/en-US/market.xml +++ b/intl/markets/en-US/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/es-ES/market.xml b/intl/markets/es-ES/market.xml index 4f8d3e51..648162af 100644 --- a/intl/markets/es-ES/market.xml +++ b/intl/markets/es-ES/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/et-EE/market.xml b/intl/markets/et-EE/market.xml index 784ce7f8..f919887e 100644 --- a/intl/markets/et-EE/market.xml +++ b/intl/markets/et-EE/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/eu-es/market.xml b/intl/markets/eu-es/market.xml index 7b5d8d5d..c14c0ea2 100644 --- a/intl/markets/eu-es/market.xml +++ b/intl/markets/eu-es/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/fa-IR/market.xml b/intl/markets/fa-IR/market.xml index ce2d2aa7..ced6fc76 100644 --- a/intl/markets/fa-IR/market.xml +++ b/intl/markets/fa-IR/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/fi-fi/market.xml b/intl/markets/fi-fi/market.xml index bb809cd1..388e767c 100644 --- a/intl/markets/fi-fi/market.xml +++ b/intl/markets/fi-fi/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/fil-PH/market.xml b/intl/markets/fil-PH/market.xml index 51ff5cd6..67cb0e8d 100644 --- a/intl/markets/fil-PH/market.xml +++ b/intl/markets/fil-PH/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/fr-FR/market.xml b/intl/markets/fr-FR/market.xml index 88e954b8..7f6e0415 100644 --- a/intl/markets/fr-FR/market.xml +++ b/intl/markets/fr-FR/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/ga-IE/market.xml b/intl/markets/ga-IE/market.xml index fcc17d8e..9091c33f 100644 --- a/intl/markets/ga-IE/market.xml +++ b/intl/markets/ga-IE/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/gl-ES/market.xml b/intl/markets/gl-ES/market.xml index 9894e186..70355f2d 100644 --- a/intl/markets/gl-ES/market.xml +++ b/intl/markets/gl-ES/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/gu-in/market.xml b/intl/markets/gu-in/market.xml index 7a11151b..56c75f35 100644 --- a/intl/markets/gu-in/market.xml +++ b/intl/markets/gu-in/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/he-IL/market.xml b/intl/markets/he-IL/market.xml index 892506c7..e1e3e174 100644 --- a/intl/markets/he-IL/market.xml +++ b/intl/markets/he-IL/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/hi-in/market.xml b/intl/markets/hi-in/market.xml index 740e9fce..3ae4afb6 100644 --- a/intl/markets/hi-in/market.xml +++ b/intl/markets/hi-in/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/hr-HR/market.xml b/intl/markets/hr-HR/market.xml index 50b598fe..48ab7ec1 100644 --- a/intl/markets/hr-HR/market.xml +++ b/intl/markets/hr-HR/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/hu-HU/market.xml b/intl/markets/hu-HU/market.xml index 691e8557..041003b0 100644 --- a/intl/markets/hu-HU/market.xml +++ b/intl/markets/hu-HU/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/id-id/market.xml b/intl/markets/id-id/market.xml index 6ef196ac..6542cdb2 100644 --- a/intl/markets/id-id/market.xml +++ b/intl/markets/id-id/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/is-IS/market.xml b/intl/markets/is-IS/market.xml index 9564cbe1..b243ca72 100644 --- a/intl/markets/is-IS/market.xml +++ b/intl/markets/is-IS/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/it-IT/market.xml b/intl/markets/it-IT/market.xml index 99f32a5d..e70a5dda 100644 --- a/intl/markets/it-IT/market.xml +++ b/intl/markets/it-IT/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/ja-JP/market.xml b/intl/markets/ja-JP/market.xml index c18cfc9d..c0b06553 100644 --- a/intl/markets/ja-JP/market.xml +++ b/intl/markets/ja-JP/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/kn-in/market.xml b/intl/markets/kn-in/market.xml index 08ceeccf..cbd7363a 100644 --- a/intl/markets/kn-in/market.xml +++ b/intl/markets/kn-in/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/ko-KR/market.xml b/intl/markets/ko-KR/market.xml index 15a48ccf..a410c4bc 100644 --- a/intl/markets/ko-KR/market.xml +++ b/intl/markets/ko-KR/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/kok-IN/market.xml b/intl/markets/kok-IN/market.xml index 6ad82cc5..1f883600 100644 --- a/intl/markets/kok-IN/market.xml +++ b/intl/markets/kok-IN/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/lt-LT/market.xml b/intl/markets/lt-LT/market.xml index 64ab64a0..d4b829e3 100644 --- a/intl/markets/lt-LT/market.xml +++ b/intl/markets/lt-LT/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/lv-LV/market.xml b/intl/markets/lv-LV/market.xml index 416f3932..fb58e331 100644 --- a/intl/markets/lv-LV/market.xml +++ b/intl/markets/lv-LV/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/master.xml b/intl/markets/master.xml index bc0a8e90..e790bb08 100644 --- a/intl/markets/master.xml +++ b/intl/markets/master.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/mk-MK/market.xml b/intl/markets/mk-MK/market.xml index 6def75c9..d4020e2f 100644 --- a/intl/markets/mk-MK/market.xml +++ b/intl/markets/mk-MK/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/ml-in/market.xml b/intl/markets/ml-in/market.xml index 0ba139dd..8d53b943 100644 --- a/intl/markets/ml-in/market.xml +++ b/intl/markets/ml-in/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/mr-in/market.xml b/intl/markets/mr-in/market.xml index d559fc38..834f5b71 100644 --- a/intl/markets/mr-in/market.xml +++ b/intl/markets/mr-in/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/ms-my/market.xml b/intl/markets/ms-my/market.xml index 8a39ce27..901be6db 100644 --- a/intl/markets/ms-my/market.xml +++ b/intl/markets/ms-my/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/mt-MT/market.xml b/intl/markets/mt-MT/market.xml index ef32d8da..08ad51e6 100644 --- a/intl/markets/mt-MT/market.xml +++ b/intl/markets/mt-MT/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/nb-NO/market.xml b/intl/markets/nb-NO/market.xml index 5a94e26c..c9a045a2 100644 --- a/intl/markets/nb-NO/market.xml +++ b/intl/markets/nb-NO/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/ne-NP/market.xml b/intl/markets/ne-NP/market.xml index d28eda3e..efcf03be 100644 --- a/intl/markets/ne-NP/market.xml +++ b/intl/markets/ne-NP/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/nl-NL/market.xml b/intl/markets/nl-NL/market.xml index 7333baad..9f812993 100644 --- a/intl/markets/nl-NL/market.xml +++ b/intl/markets/nl-NL/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/nn-NO/market.xml b/intl/markets/nn-NO/market.xml index 9fba18df..92186959 100644 --- a/intl/markets/nn-NO/market.xml +++ b/intl/markets/nn-NO/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/or-IN/market.xml b/intl/markets/or-IN/market.xml index 01ff6ded..85ae956d 100644 --- a/intl/markets/or-IN/market.xml +++ b/intl/markets/or-IN/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/pa-IN/market.xml b/intl/markets/pa-IN/market.xml index 4e9d30ba..59a72f1f 100644 --- a/intl/markets/pa-IN/market.xml +++ b/intl/markets/pa-IN/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/pl-PL/market.xml b/intl/markets/pl-PL/market.xml index f7166e07..e78c8959 100644 --- a/intl/markets/pl-PL/market.xml +++ b/intl/markets/pl-PL/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/prs-AF/market.xml b/intl/markets/prs-AF/market.xml index d498ef27..db9bb9de 100644 --- a/intl/markets/prs-AF/market.xml +++ b/intl/markets/prs-AF/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/pt-BR/market.xml b/intl/markets/pt-BR/market.xml index e2536cd6..5d125448 100644 --- a/intl/markets/pt-BR/market.xml +++ b/intl/markets/pt-BR/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/pt-PT/market.xml b/intl/markets/pt-PT/market.xml index ede1db78..52873598 100644 --- a/intl/markets/pt-PT/market.xml +++ b/intl/markets/pt-PT/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/ro-RO/market.xml b/intl/markets/ro-RO/market.xml index 9ed7ff59..d8beabf8 100644 --- a/intl/markets/ro-RO/market.xml +++ b/intl/markets/ro-RO/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/ru-RU/market.xml b/intl/markets/ru-RU/market.xml index eb59cda4..e170db6d 100644 --- a/intl/markets/ru-RU/market.xml +++ b/intl/markets/ru-RU/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/sk-SK/market.xml b/intl/markets/sk-SK/market.xml index cd294438..663bb838 100644 --- a/intl/markets/sk-SK/market.xml +++ b/intl/markets/sk-SK/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/sl-SI/market.xml b/intl/markets/sl-SI/market.xml index c6815c5e..2ca6d1b6 100644 --- a/intl/markets/sl-SI/market.xml +++ b/intl/markets/sl-SI/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/sq-AL/market.xml b/intl/markets/sq-AL/market.xml index 53bc67bf..a032ce6e 100644 --- a/intl/markets/sq-AL/market.xml +++ b/intl/markets/sq-AL/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/sr-LATN-CS/market.xml b/intl/markets/sr-LATN-CS/market.xml index c24746c6..80f59590 100644 --- a/intl/markets/sr-LATN-CS/market.xml +++ b/intl/markets/sr-LATN-CS/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/sr-cyrl-ba/market.xml b/intl/markets/sr-cyrl-ba/market.xml index 0dd85c3b..1df1499f 100644 --- a/intl/markets/sr-cyrl-ba/market.xml +++ b/intl/markets/sr-cyrl-ba/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/sr-cyrl-cs/market.xml b/intl/markets/sr-cyrl-cs/market.xml index 0a11677f..af06c239 100644 --- a/intl/markets/sr-cyrl-cs/market.xml +++ b/intl/markets/sr-cyrl-cs/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/sv-SE/market.xml b/intl/markets/sv-SE/market.xml index d23f15fc..30f0055d 100644 --- a/intl/markets/sv-SE/market.xml +++ b/intl/markets/sv-SE/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/sw-KE/market.xml b/intl/markets/sw-KE/market.xml index 6c2b6d16..69452926 100644 --- a/intl/markets/sw-KE/market.xml +++ b/intl/markets/sw-KE/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/ta-in/market.xml b/intl/markets/ta-in/market.xml index 902e0903..5b9eaa73 100644 --- a/intl/markets/ta-in/market.xml +++ b/intl/markets/ta-in/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/te-in/market.xml b/intl/markets/te-in/market.xml index c7c2473c..e0f45106 100644 --- a/intl/markets/te-in/market.xml +++ b/intl/markets/te-in/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/th-TH/market.xml b/intl/markets/th-TH/market.xml index 9174df2f..3516497e 100644 --- a/intl/markets/th-TH/market.xml +++ b/intl/markets/th-TH/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/tr-TR/market.xml b/intl/markets/tr-TR/market.xml index 4bde1238..858f9c49 100644 --- a/intl/markets/tr-TR/market.xml +++ b/intl/markets/tr-TR/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/uk-UA/market.xml b/intl/markets/uk-UA/market.xml index 76b1d203..08db9a5f 100644 --- a/intl/markets/uk-UA/market.xml +++ b/intl/markets/uk-UA/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/ur-PK/market.xml b/intl/markets/ur-PK/market.xml index 6b7ad3c0..663f4f85 100644 --- a/intl/markets/ur-PK/market.xml +++ b/intl/markets/ur-PK/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/vi-vn/market.xml b/intl/markets/vi-vn/market.xml index 56e556fa..bd89565e 100644 --- a/intl/markets/vi-vn/market.xml +++ b/intl/markets/vi-vn/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/zh-CN/market.xml b/intl/markets/zh-CN/market.xml index b5caa831..2dfd4f94 100644 --- a/intl/markets/zh-CN/market.xml +++ b/intl/markets/zh-CN/market.xml @@ -26,7 +26,7 @@ - + diff --git a/intl/markets/zh-tw/market.xml b/intl/markets/zh-tw/market.xml index ff85b2ac..81aaa1ba 100644 --- a/intl/markets/zh-tw/market.xml +++ b/intl/markets/zh-tw/market.xml @@ -26,7 +26,7 @@ - + diff --git a/src/managed/OpenLiveWriter.ApplicationFramework/CommandBarEntryCollection.cs b/src/managed/OpenLiveWriter.ApplicationFramework/CommandBarEntryCollection.cs index fa328c94..5ee0f0bf 100644 --- a/src/managed/OpenLiveWriter.ApplicationFramework/CommandBarEntryCollection.cs +++ b/src/managed/OpenLiveWriter.ApplicationFramework/CommandBarEntryCollection.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for details. using System.Collections; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing.Design; @@ -11,212 +12,7 @@ namespace OpenLiveWriter.ApplicationFramework /// Represents a collection of CommandBarEntry objects. /// [Editor(typeof(CommandBarEntryCollectionEditor), typeof(UITypeEditor))] - public class CommandBarEntryCollection : CollectionBase + public class CommandBarEntryCollection : List { - /// - /// Initializes a new instance of the CommandBarEntryCollection class. - /// - public CommandBarEntryCollection() - { - } - - /// - /// Initializes a new instance of the CommandBarEntryCollection class. - /// - /// Command bar entry collection to initializes this command bar entry collection with. - public CommandBarEntryCollection(CommandBarEntryCollection value) - { - AddRange(value); - } - - /// - /// Initializes a new instance of the CommandBarEntryCollection class. - /// - /// Array of commands to initializes this command collection with. - public CommandBarEntryCollection(CommandBarEntry[] value) - { - AddRange(value); - } - - /// - /// Gets or sets the command bar entry at the specified index. - /// - public CommandBarEntry this[int index] - { - get - { - return (CommandBarEntry)List[index]; - } - set - { - List[index] = value; - } - } - - /// - /// Adds the specified command bar entry to the end of the command bar entry collection. - /// - /// The command bar entry to be added to the end of the command bar entry collection. - /// The index at which the command bar entry has been added. - public int Add(CommandBarEntry value) - { - return List.Add(value); - } - - /// - /// Adds the entries from the specified CommandBarEntryCollection to the end of this CommandBarEntryCollection. - /// - /// The CommandBarEntryCollection to be added to the end of this CommandBarEntryCollection. - public void AddRange(CommandBarEntryCollection value) - { - foreach (CommandBarEntry commandBarEntry in value) - Add(commandBarEntry); - } - - /// - /// Adds the specified array of CommandBarEntry values to the end of the CommandBarEntryCollection. - /// - /// The array of CommandBarEntry values to be added to the end of the CommandBarEntryCollection. - public void AddRange(CommandBarEntry[] value) - { - foreach (CommandBarEntry commandBarEntry in value) - this.Add(commandBarEntry); - } - - /// - /// Determines whether the CommandBarEntryCollection contains a specific element. - /// - /// The CommandBarEntry to locate in the CommandBarEntryCollection. - /// true if the CommandBarEntryCollection contains the specified value; otherwise, false. - public bool Contains(CommandBarEntry value) - { - return List.Contains(value); - } - - /// - /// Copies the entire CommandBarEntryCollection to a one-dimensional Array, starting at the - /// specified index of the target array. - /// - /// The one-dimensional Array that is the destination of the elements copied from CommandBarEntryCollection. The Array must have zero-based indexing. - /// The zero-based index in array at which copying begins. - public void CopyTo(CommandBarEntry[] array, int index) - { - List.CopyTo(array, index); - } - - /// - /// Searches for the specified CommandBarEntry and returns the zero-based index of the - /// first occurrence within the entire CommandBarEntryCollection. - /// - /// The CommandBarEntry to locate in the CommandBarEntryCollection. - /// The zero-based index of the first occurrence of value within the entire CommandBarEntryCollection, if found; otherwise, -1. - public int IndexOf(CommandBarEntry value) - { - return List.IndexOf(value); - } - - /// - /// Inserts an element into the CommandBarEntryCollection at the specified index. - /// - /// The zero-based index at which value should be inserted. - /// The CommandBarEntry to insert. - public void Insert(int index, CommandBarEntry value) - { - List.Insert(index, value); - } - - /// - /// Returns an enumerator that can iterate through the CommandBarEntryCollection. - /// - /// An CommandBarEntryEnumerator for the CommandBarEntryCollection instance. - public new CommandBarEntryEnumerator GetEnumerator() - { - return new CommandBarEntryEnumerator(this); - } - - /// - /// Removes the first occurrence of a specific Command from the CommandCollection. - /// - /// The Command to remove. - public void Remove(CommandBarEntry value) - { - List.Remove(value); - } - - /// - /// Supports a simple iteration over a CommandBarEntryCollection. - /// - public class CommandBarEntryEnumerator : object, IEnumerator - { - /// - /// Private data. - /// - private IEnumerator baseEnumerator; - private IEnumerable temp; - - /// - /// Initializes a new instance of the CommandBarEntryEnumerator class. - /// - /// The CommandBarEntryCollection to enumerate. - public CommandBarEntryEnumerator(CommandBarEntryCollection mappings) - { - temp = (IEnumerable)mappings; - baseEnumerator = temp.GetEnumerator(); - } - - /// - /// Gets the current element in the collection. - /// - public CommandBarEntry Current - { - get - { - return (CommandBarEntry)baseEnumerator.Current; - } - } - - /// - /// Gets the current element in the collection. - /// - object IEnumerator.Current - { - get - { - return baseEnumerator.Current; - } - } - - /// - /// Advances the enumerator to the next element of the collection. - /// - public bool MoveNext() - { - return baseEnumerator.MoveNext(); - } - - /// - /// Advances the enumerator to the next element of the collection. - /// - bool IEnumerator.MoveNext() - { - return baseEnumerator.MoveNext(); - } - - /// - /// Sets the enumerator to its initial position, which is before the first element in the collection. - /// - public void Reset() - { - baseEnumerator.Reset(); - } - - /// - /// Sets the enumerator to its initial position, which is before the first element in the collection. - /// - void IEnumerator.Reset() - { - baseEnumerator.Reset(); - } - } } } diff --git a/src/managed/OpenLiveWriter.ApplicationFramework/CommandCollection.cs b/src/managed/OpenLiveWriter.ApplicationFramework/CommandCollection.cs index 92baa8ac..ef24bd6a 100644 --- a/src/managed/OpenLiveWriter.ApplicationFramework/CommandCollection.cs +++ b/src/managed/OpenLiveWriter.ApplicationFramework/CommandCollection.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for details. using System.Collections; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing.Design; @@ -11,212 +12,12 @@ namespace OpenLiveWriter.ApplicationFramework /// Represents a collection of commands. /// [Editor(typeof(CommandCollectionEditor), typeof(UITypeEditor))] - public class CommandCollection : CollectionBase + public class CommandCollection : List { - /// - /// Initializes a new instance of the CommandCollection class. - /// - public CommandCollection() - { - } + public CommandCollection() : base() { } - /// - /// Initializes a new instance of the CommandCollection class. - /// - /// Command collection to initializes this command collection with. - public CommandCollection(CommandCollection value) - { - AddRange(value); - } + public CommandCollection(int capacity) : base(capacity) { } - /// - /// Initializes a new instance of the CommandCollection class. - /// - /// Array of commands to initializes this command collection with. - public CommandCollection(Command[] value) - { - AddRange(value); - } - - /// - /// Gets or sets the command at the specified index. - /// - public Command this[int index] - { - get - { - return (Command)List[index]; - } - set - { - List[index] = value; - } - } - - /// - /// Adds the specified command to the end of the command collection. - /// - /// The command to be added to the end of the command collection. - /// The index at which the command has been added. - public int Add(Command value) - { - return List.Add(value); - } - - /// - /// Adds the entries from the specified CommandCollection to the end of this CommandCollection. - /// - /// The CommandCollection to be added to the end of this CommandCollection. - public void AddRange(CommandCollection value) - { - foreach (Command command in value) - Add(command); - } - - /// - /// Adds the specified array of Command values to the end of the CommandCollection. - /// - /// The array of Command values to be added to the end of the CommandCollection. - public void AddRange(Command[] value) - { - foreach (Command command in value) - Add(command); - } - - /// - /// Determines whether the CommandCollection contains a specific element. - /// - /// The Command to locate in the CommandCollection. - /// true if the CommandCollection contains the specified value; otherwise, false. - public bool Contains(Command value) - { - return List.Contains(value); - } - - /// - /// Copies the entire CommandCollection to a one-dimensional Array, starting at the - /// specified index of the target array. - /// - /// The one-dimensional Array that is the destination of the elements copied from CommandCollection. The Array must have zero-based indexing. - /// The zero-based index in array at which copying begins. - public void CopyTo(Command[] array, int index) - { - List.CopyTo(array, index); - } - - /// - /// Searches for the specified Command and returns the zero-based index of the first - /// occurrence within the entire CommandCollection. - /// - /// The Command to locate in the CommandCollection. - /// The zero-based index of the first occurrence of value within the entire CommandCollection, if found; otherwise, -1. - public int IndexOf(Command value) - { - return List.IndexOf(value); - } - - /// - /// Inserts an element into the CommandCollection at the specified index. - /// - /// The zero-based index at which value should be inserted. - /// The Command to insert. - public void Insert(int index, Command value) - { - List.Insert(index, value); - } - - /// - /// Returns an enumerator that can iterate through the CommandCollection. - /// - /// An CommandEnumerator for the CommandCollection instance. - public new CommandEnumerator GetEnumerator() - { - return new CommandEnumerator(this); - } - - /// - /// Removes the first occurrence of a specific Command from the CommandCollection. - /// - /// The Command to remove. - public void Remove(Command value) - { - List.Remove(value); - } - - /// - /// Supports a simple iteration over a CommandCollection. - /// - public class CommandEnumerator : object, IEnumerator - { - /// - /// Private data. - /// - private IEnumerator baseEnumerator; - private IEnumerable temp; - - /// - /// Initializes a new instance of the CommandEnumerator class. - /// - /// The CommandCollection to enumerate. - public CommandEnumerator(CommandCollection mappings) - { - temp = (IEnumerable)mappings; - baseEnumerator = temp.GetEnumerator(); - } - - /// - /// Gets the current element in the collection. - /// - public Command Current - { - get - { - return (Command)baseEnumerator.Current; - } - } - - /// - /// Gets the current element in the collection. - /// - object IEnumerator.Current - { - get - { - return baseEnumerator.Current; - } - } - - /// - /// Advances the enumerator to the next element of the collection. - /// - public bool MoveNext() - { - return baseEnumerator.MoveNext(); - } - - /// - /// Advances the enumerator to the next element of the collection. - /// - bool IEnumerator.MoveNext() - { - return baseEnumerator.MoveNext(); - } - - /// - /// Sets the enumerator to its initial position, which is before the first element in the collection. - /// - public void Reset() - { - baseEnumerator.Reset(); - } - - /// - /// Sets the enumerator to its initial position, which is before the first element in the collection. - /// - void IEnumerator.Reset() - { - baseEnumerator.Reset(); - } - } + public CommandCollection(IEnumerable commands) : base(commands) { } } } diff --git a/src/managed/OpenLiveWriter.ApplicationFramework/MenuDefinitionEntryCollection.cs b/src/managed/OpenLiveWriter.ApplicationFramework/MenuDefinitionEntryCollection.cs index 5cbb0ac5..5c37223d 100644 --- a/src/managed/OpenLiveWriter.ApplicationFramework/MenuDefinitionEntryCollection.cs +++ b/src/managed/OpenLiveWriter.ApplicationFramework/MenuDefinitionEntryCollection.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for details. using System.Collections; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing.Design; using OpenLiveWriter.Localization; @@ -12,233 +13,28 @@ namespace OpenLiveWriter.ApplicationFramework /// Represents a collection of MenuDefinitionEntry objects. /// [Editor(typeof(MenuDefinitionEntryCollectionEditor), typeof(UITypeEditor))] - public class MenuDefinitionEntryCollection : CollectionBase + public class MenuDefinitionEntryCollection : List { - /// - /// Initializes a new instance of the MenuDefinitionEntryCollection class. - /// - public MenuDefinitionEntryCollection() - { - } - - /// - /// Initializes a new instance of the MenuDefinitionEntryCollection class. - /// - /// Command bar entry collection to initializes this command bar entry collection with. - public MenuDefinitionEntryCollection(MenuDefinitionEntryCollection value) - { - AddRange(value); - } - - /// - /// Initializes a new instance of the MenuDefinitionEntryCollection class. - /// - /// Array of commands to initializes this command collection with. - public MenuDefinitionEntryCollection(MenuDefinitionEntry[] value) - { - AddRange(value); - } - - /// - /// Gets or sets the command bar entry at the specified index. - /// - public MenuDefinitionEntry this[int index] - { - get - { - return (MenuDefinitionEntry)List[index]; - } - set - { - List[index] = value; - } - } - - /// - /// Adds the specified command bar entry to the end of the command bar entry collection. - /// - /// The command bar entry to be added to the end of the command bar entry collection. - /// The index at which the command bar entry has been added. - public int Add(MenuDefinitionEntry value) - { - return List.Add(value); - } - /// /// Use strongly typed overload instead of this if possible!! /// - public int Add(string commandIdentifier, bool separatorBefore, bool separatorAfter) + public void Add(string commandIdentifier, bool separatorBefore, bool separatorAfter) { MenuDefinitionEntryCommand mde = new MenuDefinitionEntryCommand(); mde.CommandIdentifier = commandIdentifier; mde.SeparatorBefore = separatorBefore; mde.SeparatorAfter = separatorAfter; - return Add(mde); + Add(mde); } - public int Add(CommandId commandIdentifier, bool separatorBefore, bool separatorAfter) + public void Add(CommandId commandIdentifier, bool separatorBefore, bool separatorAfter) { MenuDefinitionEntryCommand mde = new MenuDefinitionEntryCommand(); mde.CommandIdentifier = commandIdentifier.ToString(); mde.SeparatorBefore = separatorBefore; mde.SeparatorAfter = separatorAfter; - return Add(mde); - } - - /// - /// Adds the entries from the specified MenuDefinitionEntryCollection to the end of this MenuDefinitionEntryCollection. - /// - /// The MenuDefinitionEntryCollection to be added to the end of this MenuDefinitionEntryCollection. - public void AddRange(MenuDefinitionEntryCollection value) - { - foreach (MenuDefinitionEntry commandBarEntry in value) - Add(commandBarEntry); - } - - /// - /// Adds the specified array of MenuDefinitionEntry values to the end of the MenuDefinitionEntryCollection. - /// - /// The array of MenuDefinitionEntry values to be added to the end of the MenuDefinitionEntryCollection. - public void AddRange(MenuDefinitionEntry[] value) - { - foreach (MenuDefinitionEntry commandBarEntry in value) - this.Add(commandBarEntry); - } - - /// - /// Determines whether the MenuDefinitionEntryCollection contains a specific element. - /// - /// The MenuDefinitionEntry to locate in the MenuDefinitionEntryCollection. - /// true if the MenuDefinitionEntryCollection contains the specified value; otherwise, false. - public bool Contains(MenuDefinitionEntry value) - { - return List.Contains(value); - } - - /// - /// Copies the entire MenuDefinitionEntryCollection to a one-dimensional Array, starting at the - /// specified index of the target array. - /// - /// The one-dimensional Array that is the destination of the elements copied from MenuDefinitionEntryCollection. The Array must have zero-based indexing. - /// The zero-based index in array at which copying begins. - public void CopyTo(MenuDefinitionEntry[] array, int index) - { - List.CopyTo(array, index); - } - - /// - /// Searches for the specified MenuDefinitionEntry and returns the zero-based index of the - /// first occurrence within the entire MenuDefinitionEntryCollection. - /// - /// The MenuDefinitionEntry to locate in the MenuDefinitionEntryCollection. - /// The zero-based index of the first occurrence of value within the entire MenuDefinitionEntryCollection, if found; otherwise, -1. - public int IndexOf(MenuDefinitionEntry value) - { - return List.IndexOf(value); - } - - /// - /// Inserts an element into the MenuDefinitionEntryCollection at the specified index. - /// - /// The zero-based index at which value should be inserted. - /// The MenuDefinitionEntry to insert. - public void Insert(int index, MenuDefinitionEntry value) - { - List.Insert(index, value); - } - - /// - /// Returns an enumerator that can iterate through the MenuDefinitionEntryCollection. - /// - /// An MenuDefinitionEntryEnumerator for the MenuDefinitionEntryCollection instance. - public new MenuDefinitionEntryEnumerator GetEnumerator() - { - return new MenuDefinitionEntryEnumerator(this); - } - - /// - /// Removes the first occurrence of a specific Command from the CommandCollection. - /// - /// The Command to remove. - public void Remove(MenuDefinitionEntry value) - { - List.Remove(value); - } - - /// - /// Supports a simple iteration over a MenuDefinitionEntryCollection. - /// - public class MenuDefinitionEntryEnumerator : object, IEnumerator - { - /// - /// Private data. - /// - private IEnumerator baseEnumerator; - private IEnumerable temp; - - /// - /// Initializes a new instance of the MenuDefinitionEntryEnumerator class. - /// - /// The MenuDefinitionEntryCollection to enumerate. - public MenuDefinitionEntryEnumerator(MenuDefinitionEntryCollection mappings) - { - temp = (IEnumerable)mappings; - baseEnumerator = temp.GetEnumerator(); - } - - /// - /// Gets the current element in the collection. - /// - public MenuDefinitionEntry Current - { - get - { - return (MenuDefinitionEntry)baseEnumerator.Current; - } - } - - /// - /// Gets the current element in the collection. - /// - object IEnumerator.Current - { - get - { - return baseEnumerator.Current; - } - } - - /// - /// Advances the enumerator to the next element of the collection. - /// - public bool MoveNext() - { - return baseEnumerator.MoveNext(); - } - - /// - /// Advances the enumerator to the next element of the collection. - /// - bool IEnumerator.MoveNext() - { - return baseEnumerator.MoveNext(); - } - - /// - /// Sets the enumerator to its initial position, which is before the first element in the collection. - /// - public void Reset() - { - baseEnumerator.Reset(); - } - - /// - /// Sets the enumerator to its initial position, which is before the first element in the collection. - /// - void IEnumerator.Reset() - { - baseEnumerator.Reset(); - } + Add(mde); } + } } diff --git a/src/managed/OpenLiveWriter.BlogClient/Providers/BlogProvidersB5.xml b/src/managed/OpenLiveWriter.BlogClient/Providers/BlogProvidersB5.xml index 82143bbe..2e70057d 100644 --- a/src/managed/OpenLiveWriter.BlogClient/Providers/BlogProvidersB5.xml +++ b/src/managed/OpenLiveWriter.BlogClient/Providers/BlogProvidersB5.xml @@ -339,7 +339,7 @@ D3405AD6-9E02-43b3-87F4-08F5A5946B40 - Community Server + Telligent Community The easiest and most powerful way to build and grow a robust online community. Metaweblog @@ -367,6 +367,36 @@ Yes + + E83A8A63-0F40-4499-AAD1-DFB2577CCC40 + Telligent Community 8.0+ + The easiest and most powerful way to build and grow a robust online community. + Metaweblog + + //b//metablog + ]]> + + Community Server + + Yes + Yes + Yes + No + Yes + WebLayout + ^0$ + object reference not set to an instance of an object + Yes + Yes + No + Yes + No + No + {AsciiFileNameWithoutExtension}_{Randomizer}{FileExtension} + Yes + + A82F57E0-41D3-45e9-861E-8C527844BCA6 dasBlog