refactor text to speech

refactor text to speech

--- Examples/ServiceExamples/Scripts/ExampleTextToSpeech.cs
+++ Examples/ServiceExamples/Scripts/ExampleTextToSpeech.cs
@@ -33,9 +33,28 @@
     //private string _token = "<authentication-token>";

     TextToSpeech _textToSpeech;
-    string _testString = "<speak version=\"1.0\"><say-as interpret-as=\"letters\">I'm sorry</say-as>. <prosody pitch=\"150Hz\">This is Text to Speech!</prosody></express-as><express-as type=\"GoodNews\">I'm sorry. This is Text to Speech!</express-as></speak>";
+    string _testString = "<speak version=\"1.0\"><say-as interpret-as=\"letters\">I'm sorry</say-as>. <prosody pitch=\"150Hz\">This is Text to Speech!</prosody><express-as type=\"GoodNews\">I'm sorry. This is Text to Speech!</express-as></speak>";
+
+    string _createdCustomizationId;
+    CustomVoiceUpdate _customVoiceUpdate;
+    string _customizationName = "unity-example-customization";
+    string _customizationLanguage = "en-US";
+    string _customizationDescription = "A text to speech voice customization created within Unity.";
+    string _testWord = "Watson";

     private bool _synthesizeTested = false;
+    private bool _getVoicesTested = false;
+    private bool _getVoiceTested = false;
+    private bool _getPronuciationTested = false;
+    private bool _getCustomizationsTested = false;
+    private bool _createCustomizationTested = false;
+    private bool _deleteCustomizationTested = false;
+    private bool _getCustomizationTested = false;
+    private bool _updateCustomizationTested = false;
+    private bool _getCustomizationWordsTested = false;
+    private bool _addCustomizationWordsTested = false;
+    private bool _deleteCustomizationWordTested = false;
+    private bool _getCustomizationWordTested = false;

     void Start()
     {
@@ -85,120 +104,150 @@

     private IEnumerator Examples()
     {
+        //  Synthesize
+        Log.Debug("ExampleTextToSpeech", "Attempting synthesize.");
+        _textToSpeech.Voice = VoiceType.en_US_Allison;
+        _textToSpeech.ToSpeech(_testString, HandleToSpeechCallback, true);
         while (!_synthesizeTested)
             yield return null;

-        ////	Get Voices
-        //Log.Debug("ExampleTextToSpeech", "Attempting to get voices.");
-        //m_TextToSpeech.GetVoices(OnGetVoices);
-
-        ////	Get Voice
-        ////string selectedVoice = "en-US_AllisonVoice";
-        //Log.Debug("ExampleTextToSpeech", "Attempting to get voice {0}.", VoiceType.en_US_Allison);
-        //m_TextToSpeech.GetVoice(OnGetVoice, VoiceType.en_US_Allison);
-
-        ////	Get Pronunciation
-        //string testWord = "Watson";
-        //Log.Debug("ExampleTextToSpeech", "Attempting to get pronunciation of {0}", testWord);
-        //m_TextToSpeech.GetPronunciation(OnGetPronunciation, testWord, VoiceType.en_US_Allison);
-
-        // Get Customizations
-        //Log.Debug("ExampleTextToSpeech", "Attempting to get a list of customizations");
-        //m_TextToSpeech.GetCustomizations(OnGetCustomizations);
-
-        //	Create Customization
-        //Log.Debug("ExampleTextToSpeech", "Attempting to create a customization");
-        //string customizationName = "unity-example-customization";
-        //string customizationLanguage = "en-US";
-        //string customizationDescription = "A text to speech voice customization created within Unity.";
-        //m_TextToSpeech.CreateCustomization(OnCreateCustomization, customizationName, customizationLanguage, customizationDescription);
-
-        //	Delete Customization
-        //Log.Debug("ExampleTextToSpeech", "Attempting to delete a customization");
-        //string customizationIdentifierToDelete = "1476ea80-5355-4911-ac99-ba39162a2d34";
-        //if (!m_TextToSpeech.DeleteCustomization(OnDeleteCustomization, customizationIdentifierToDelete))
-        //	Log.Debug("ExampleTextToSpeech", "Failed to delete custom voice model!");
-
-        //	Get Customization
-        //Log.Debug("ExampleTextToSpeech", "Attempting to get a customization");
-        //string customizationIdentifierToGet = "1476ea80-5355-4911-ac99-ba39162a2d34";
-        //if (!m_TextToSpeech.GetCustomization(OnGetCustomization, customizationIdentifierToGet))
-        //	Log.Debug("ExampleTextToSpeech", "Failed to get custom voice model!");
-
-        //	Update Customization
+        //	Get Voices
+        Log.Debug("ExampleTextToSpeech", "Attempting to get voices.");
+        _textToSpeech.GetVoices(OnGetVoices);
+        while (!_getVoicesTested)
+            yield return null;
+
+        //	Get Voice
+        string selectedVoice = "en-US_AllisonVoice";
+        Log.Debug("ExampleTextToSpeech", "Attempting to get voice {0}.", VoiceType.en_US_Allison);
+        _textToSpeech.GetVoice(OnGetVoice, VoiceType.en_US_Allison);
+        while (!_getVoiceTested)
+            yield return null;
+
+        //	Get Pronunciation
+        Log.Debug("ExampleTextToSpeech", "Attempting to get pronunciation of {0}", _testWord);
+        _textToSpeech.GetPronunciation(OnGetPronunciation, _testWord, VoiceType.en_US_Allison);
+        while (!_getPronuciationTested)
+            yield return null;
+
+        //  Get Customizations
+        Log.Debug("ExampleTextToSpeech", "Attempting to get a list of customizations");
+        _textToSpeech.GetCustomizations(OnGetCustomizations);
+        while (!_getCustomizationsTested)
+            yield return null;
+
+        //  Create Customization
+        Log.Debug("ExampleTextToSpeech", "Attempting to create a customization");
+        _textToSpeech.CreateCustomization(OnCreateCustomization, _customizationName, _customizationLanguage, _customizationDescription);
+        while (!_createCustomizationTested)
+            yield return null;
+
+        //  Get Customization
+        Log.Debug("ExampleTextToSpeech", "Attempting to get a customization");
+        if (!_textToSpeech.GetCustomization(OnGetCustomization, _createdCustomizationId))
+            Log.Debug("ExampleTextToSpeech", "Failed to get custom voice model!");
+        while (!_getCustomizationTested)
+            yield return null;
+
+        //  Update Customization
         Log.Debug("ExampleTextToSpeech", "Attempting to update a customization");
-        Word word0 = new Word();
-        word0.word = "hello";
-        word0.translation = "hullo";
-        Word word1 = new Word();
-        word1.word = "goodbye";
-        word1.translation = "gbye";
-        Word word2 = new Word();
-        word2.word = "hi";
-        word2.translation = "ohiooo";
-        Word[] words = { word0, word1, word2 };
-        CustomVoiceUpdate customVoiceUpdate = new CustomVoiceUpdate();
-        customVoiceUpdate.words = words;
-        customVoiceUpdate.description = "My updated description";
-        customVoiceUpdate.name = "My updated name";
-        string customizationIdToUpdate = "1476ea80-5355-4911-ac99-ba39162a2d34";
-        if (!_textToSpeech.UpdateCustomization(OnUpdateCustomization, customizationIdToUpdate, customVoiceUpdate))
+        Word[] wordsToUpdateCustomization =
+        {
+            new Word()
+            {
+                word = "hello",
+                translation = "hullo"
+            },
+            new Word()
+            {
+                word = "goodbye",
+                translation = "gbye"
+            },
+            new Word()
+            {
+                word = "hi",
+                translation = "ohioooo"
+            }
+        };
+
+        _customVoiceUpdate = new CustomVoiceUpdate()
+        {
+            words = wordsToUpdateCustomization,
+            description = "My updated description",
+            name = "My updated name"
+        };
+
+        if (!_textToSpeech.UpdateCustomization(OnUpdateCustomization, _createdCustomizationId, _customVoiceUpdate))
             Log.Debug("ExampleTextToSpeech", "Failed to update customization!");
-
-        //	Get Customization Words
-        //Log.Debug("ExampleTextToSpeech", "Attempting to get a customization's words");
-        //string customIdentifierToGetWords = "1476ea80-5355-4911-ac99-ba39162a2d34";
-        //if (!m_TextToSpeech.GetCustomizationWords(OnGetCustomizationWords, customIdentifierToGetWords))
-        //	Log.Debug("ExampleTextToSpeech", "Failed to get {0} words!", customIdentifierToGetWords);
-
-        //	Add Customization Words
-        //Log.Debug("ExampleTextToSpeech", "Attempting to add words to a customization");
-        //string customIdentifierToAddWords = "1476ea80-5355-4911-ac99-ba39162a2d34";
-        //Words words = new Words();
-        //Word word0 = new Word();
-        //word0.word = "bananna";
-        //word0.translation = "bunanna";
-        //Word word1 = new Word();
-        //word1.word = "orange";
-        //word1.translation = "arange";
-        //Word word2 = new Word();
-        //word2.word = "tomato";
-        //word2.translation = "tomahto";
-        //Word[] wordArray = { word0, word1, word2 };
-        //words.words = wordArray;
-        //if (!m_TextToSpeech.AddCustomizationWords(OnAddCustomizationWords, customIdentifierToAddWords, words))
-        //	Log.Debug("ExampleTextToSpeech", "Failed to add words to {0}!", customIdentifierToAddWords);
-
-        //	Delete Customization Word
-        //Log.Debug("ExampleTextToSpeech", "Attempting to delete customization word from custom voice model.");
-        //string customIdentifierToDeleteWord = "1476ea80-5355-4911-ac99-ba39162a2d34";
-        //string wordToDelete = "goodbye";
-        //if (!m_TextToSpeech.DeleteCustomizationWord(OnDeleteCustomizationWord, customIdentifierToDeleteWord, wordToDelete))
-        //	Log.Debug("ExampleTextToSpeech", "Failed to delete {0} from {1}!", wordToDelete, customIdentifierToDeleteWord);
-
-        //	Get Customization Word
-        //Log.Debug("ExampleTextToSpeech", "Attempting to get the translation of a custom voice model's word.");
-        //string customIdentifierToGetWord = "1476ea80-5355-4911-ac99-ba39162a2d34";
-        //string customIdentifierWord = "hello";
-        //if (!m_TextToSpeech.GetCustomizationWord(OnGetCustomizationWord, customIdentifierToGetWord, customIdentifierWord))
-        //	Log.Debug("ExampleTextToSpeech", "Failed to get the translation of {0} from {1}!", customIdentifierWord, customIdentifierToGetWord);
-
-        //	Add Customization Word - This is not working. The PUT method is not supported by Unity.
-        //Log.Debug("ExampleTextToSpeech", "Attempting to add a single word and translation to a custom voice model.");
-        //string customIdentifierToAddWordAndTranslation = "1476ea80-5355-4911-ac99-ba39162a2d34";
-        //string word = "grasshopper";
-        //string translation = "guhrasshoppe";
-        //if (!m_TextToSpeech.AddCustomizationWord(OnAddCustomizationWord, customIdentifierToAddWordAndTranslation, word, translation))
-        //	Log.Debug("ExampleTextToSpeech", "Failed to add {0}/{1} to {2}!", word, translation, customIdentifierToAddWordAndTranslation);
-
-
-        //m_TextToSpeech.Voice = VoiceType.en_US_Allison;
-        //m_TextToSpeech.ToSpeech(m_TestString, HandleToSpeechCallback, true);
+        while (!_updateCustomizationTested)
+            yield return null;
+
+        //  Get Customization Words
+        Log.Debug("ExampleTextToSpeech", "Attempting to get a customization's words");
+        string customIdentifierToGetWords = "1476ea80-5355-4911-ac99-ba39162a2d34";
+        if (!_textToSpeech.GetCustomizationWords(OnGetCustomizationWords, customIdentifierToGetWords))
+            Log.Debug("ExampleTextToSpeech", "Failed to get {0} words!", customIdentifierToGetWords);
+        while (!_getCustomizationWordsTested)
+            yield return null;
+
+        //  Add Customization Words
+        Log.Debug("ExampleTextToSpeech", "Attempting to add words to a customization");
+        Word[] wordArrayToAddToCustomization =
+        {
+            new Word()
+            {
+                word = "bananna",
+                translation = "arange"
+            },
+            new Word()
+            {
+                word = "orange",
+                translation = "gbye"
+            },
+            new Word()
+            {
+                word = "tomato",
+                translation = "tomahto"
+            }
+        };
+
+        Words wordsToAddToCustomization = new Words()
+        {
+            words = wordArrayToAddToCustomization
+        };
+
+        if (!_textToSpeech.AddCustomizationWords(OnAddCustomizationWords, _createdCustomizationId, wordsToAddToCustomization))
+            Log.Debug("ExampleTextToSpeech", "Failed to add words to {0}!", _createdCustomizationId);
+        while (!_addCustomizationWordsTested)
+            yield return null;
+
+        //  Get Customization Word
+        Log.Debug("ExampleTextToSpeech", "Attempting to get the translation of a custom voice model's word.");
+        string customIdentifierWord = wordsToUpdateCustomization[0].word;
+        if (!_textToSpeech.GetCustomizationWord(OnGetCustomizationWord, _createdCustomizationId, customIdentifierWord))
+            Log.Debug("ExampleTextToSpeech", "Failed to get the translation of {0} from {1}!", customIdentifierWord, _createdCustomizationId);
+        while (!_getCustomizationWordTested)
+            yield return null;
+
+        //  Delete Customization Word
+        Log.Debug("ExampleTextToSpeech", "Attempting to delete customization word from custom voice model.");
+        string wordToDelete = "goodbye";
+        if (!_textToSpeech.DeleteCustomizationWord(OnDeleteCustomizationWord, _createdCustomizationId, wordToDelete))
+            Log.Debug("ExampleTextToSpeech", "Failed to delete {0} from {1}!", wordToDelete, _createdCustomizationId);
+        while (!_deleteCustomizationWordTested)
+            yield return null;
+
+        //  Delete Customization
+        Log.Debug("ExampleTextToSpeech", "Attempting to delete a customization");
+        if (!_textToSpeech.DeleteCustomization(OnDeleteCustomization, _createdCustomizationId))
+            Log.Debug("ExampleTextToSpeech", "Failed to delete custom voice model!");
+        while (!_deleteCustomizationTested)
+            yield return null;

         Log.Debug("ExampleTextToSpeech", "Text to Speech examples complete.");
     }

-    void HandleToSpeechCallback(AudioClip clip)
+    void HandleToSpeechCallback(AudioClip clip, string customData)
     {
         PlayClip(clip);
     }
@@ -214,121 +263,83 @@
             source.clip = clip;
             source.Play();

-            GameObject.Destroy(audioObject, clip.length);
+            Destroy(audioObject, clip.length);
+
+            _synthesizeTested = true;
         }
     }

-    private void OnGetVoices(Voices voices)
-    {
-        Log.Debug("ExampleTextToSpeech", "-----OnGetVoices-----");
-        foreach (Voice voice in voices.voices)
-            Log.Debug("ExampleTextToSpeech", "Voice | name: {0} | gender: {1} | language: {2} | customizable: {3} | description: {4}.", voice.name, voice.gender, voice.language, voice.customizable, voice.description);
-        Log.Debug("ExampleTextToSpeech", "-----OnGetVoices-----");
-    }
-
-    private void OnGetVoice(Voice voice)
-    {
-        Log.Debug("ExampleTextToSpeech", "-----OnGetVoice-----");
-        Log.Debug("ExampleTextToSpeech", "Voice | name: {0} | gender: {1} | language: {2} | customizable: {3} | description: {4}", voice.name, voice.gender, voice.language, voice.customizable, voice.description);
-        Log.Debug("ExampleTextToSpeech", "-----OnGetVoice-----");
-    }
-
-    private void OnGetPronunciation(Pronunciation pronunciation)
-    {
-        Log.Debug("ExampleTextToSpeech", "-----OnGetPronunciation-----");
-        Log.Debug("ExampleTextToSpeech", "Pronunciation: {0}.", pronunciation.pronunciation);
-        Log.Debug("ExampleTextToSpeech", "-----OnGetPronunciation-----");
-    }
-
-    private void OnGetCustomizations(Customizations customizations, string data)
-    {
-        Log.Debug("ExampleTextToSpeech", "-----OnGetCustomizations-----");
-        if (data != default(string))
-            Log.Debug("ExampleTextToSpeech", "data: {0}", data);
-        foreach (Customization customization in customizations.customizations)
-            Log.Debug("ExampleTextToSpeech", "Customization: name: {0} | customization_id: {1} | language: {2} | description: {3} | owner: {4} | created: {5} | last modified: {6}", customization.name, customization.customization_id, customization.language, customization.description, customization.owner, customization.created, customization.last_modified);
-        Log.Debug("ExampleTextToSpeech", "-----OnGetCustomizations-----");
-    }
-
-    private void OnCreateCustomization(CustomizationID customizationID, string data)
-    {
-        Log.Debug("ExampleTextToSpeech", "-----OnCreateCustomization-----");
-        if (data != default(string))
-            Log.Debug("ExampleTextToSpeech", "data: {0}", data);
-        Log.Debug("ExampleTextToSpeech", "CustomizationID: id: {0}.", customizationID.customization_id);
-        Log.Debug("ExampleTextToSpeech", "-----OnCreateCustomization-----");
-    }
-
-    private void OnDeleteCustomization(bool success, string data)
-    {
-        Log.Debug("ExampleTextToSpeech", "-----OnDeleteCustomization-----");
-        if (data != default(string))
-            Log.Debug("ExampleTextToSpeech", "data: {0}", data);
-        Log.Debug("ExampleTextToSpeech", "Success: {0}.", success);
-        Log.Debug("ExampleTextToSpeech", "-----OnDeleteCustomization-----");
-    }
-
-    private void OnGetCustomization(Customization customization, string data)
-    {
-        Log.Debug("ExampleTextToSpeech", "-----OnGetCustomization-----");
-        if (data != default(string))
-            Log.Debug("ExampleTextToSpeech", "data: {0}", data);
-        Log.Debug("ExampleTextToSpeech", "Customization: name: {0} | customization_id: {1} | language: {2} | description: {3} | owner: {4} | created: {5} | last modified: {6}", customization.name, customization.customization_id, customization.language, customization.description, customization.owner, customization.created, customization.last_modified);
-        Log.Debug("ExampleTextToSpeech", "-----OnGetCustomization-----");
-    }
-
-    private void OnUpdateCustomization(bool success, string data)
-    {
-        Log.Debug("ExampleTextToSpeech", "-----OnUpdateCustomization-----");
-        if (data != default(string))
-            Log.Debug("ExampleTextToSpeech", "data: {0}", data);
-        Log.Debug("ExampleTextToSpeech", "Success: {0}.", success);
-        Log.Debug("ExampleTextToSpeech", "-----OnUpdateCustomization-----");
-    }
-
-    private void OnGetCustomizationWords(Words words, string data)
-    {
-        Log.Debug("ExampleTextToSpeech", "-----OnGetCustomizationWords-----");
-        if (data != default(string))
-            Log.Debug("ExampleTextToSpeech", "data: {0}", data);
-        foreach (Word word in words.words)
-            Log.Debug("ExampleTextToSpeech", "Word: {0} | Translation: {1}.", word.word, word.translation);
-        Log.Debug("ExampleTextToSpeech", "-----OnGetCustomizationWords-----");
-    }
-
-    private void OnAddCustomizationWords(bool success, string data)
-    {
-        Log.Debug("ExampleTextToSpeech", "-----OnAddCustomizationWords-----");
-        if (data != default(string))
-            Log.Debug("ExampleTextToSpeech", "data: {0}", data);
-        Log.Debug("ExampleTextToSpeech", "Success: {0}.", success);
-        Log.Debug("ExampleTextToSpeech", "-----OnAddCustomizationWords-----");
-    }
-
-    private void OnDeleteCustomizationWord(bool success, string data)
-    {
-        Log.Debug("ExampleTextToSpeech", "-----OnDeleteCustomizationWord-----");
-        if (data != default(string))
-            Log.Debug("ExampleTextToSpeech", "data: {0}", data);
-        Log.Debug("ExampleTextToSpeech", "Success: {0}.", success);
-        Log.Debug("ExampleTextToSpeech", "-----OnDeleteCustomizationWord-----");
-    }
-
-    private void OnGetCustomizationWord(Translation translation, string data)
-    {
-        Log.Debug("ExampleTextToSpeech", "-----OnGetCustomizationWord-----");
-        if (data != default(string))
-            Log.Debug("ExampleTextToSpeech", "data: {0}", data);
-        Log.Debug("ExampleTextToSpeech", "Translation: {0}.", translation.translation);
-        Log.Debug("ExampleTextToSpeech", "-----OnGetCustomizationWord-----");
-    }
-
-    private void OnAddCustomizationWord(bool success, string data)
-    {
-        Log.Debug("ExampleTextToSpeech", "-----OnAddCustomizationWord-----");
-        if (data != default(string))
-            Log.Debug("ExampleTextToSpeech", "data: {0}", data);
-        Log.Debug("ExampleTextToSpeech", "Success: {0}.", success);
-        Log.Debug("ExampleTextToSpeech", "-----OnAddCustomizationWord-----");
+    private void OnGetVoices(Voices voices, string customData)
+    {
+        Log.Debug("ExampleTextToSpeech", "Text to Speech - Get voices response: {0}", customData);
+        _getVoicesTested = true;
+    }
+
+    private void OnGetVoice(Voice voice, string customData)
+    {
+        Log.Debug("ExampleTextToSpeech", "Text to Speech - Get voice  response: {0}", customData);
+        _getVoiceTested = true;
+    }
+
+    private void OnGetPronunciation(Pronunciation pronunciation, string customData)
+    {
+        Log.Debug("ExampleTextToSpeech", "Text to Speech - Get pronunciation response: {0}", customData);
+        _getPronuciationTested = true;
+    }
+
+    private void OnGetCustomizations(Customizations customizations, string customData)
+    {
+        Log.Debug("ExampleTextToSpeech", "Text to Speech - Get customizations response: {0}", customData);
+        _getCustomizationsTested = true;
+    }
+
+    private void OnCreateCustomization(CustomizationID customizationID, string customData)
+    {
+        Log.Debug("ExampleTextToSpeech", "Text to Speech - Create customization response: {0}", customData);
+        _createdCustomizationId = customizationID.customization_id;
+        _createCustomizationTested = true;
+    }
+
+    private void OnDeleteCustomization(bool success, string customData)
+    {
+        Log.Debug("ExampleTextToSpeech", "Text to Speech - Delete customization response: {0}", customData);
+        _createdCustomizationId = null;
+        _deleteCustomizationTested = true;
+    }
+
+    private void OnGetCustomization(Customization customization, string customData)
+    {
+        Log.Debug("ExampleTextToSpeech", "Text to Speech - Get customization response: {0}", customData);
+        _getCustomizationTested = true;
+    }
+
+    private void OnUpdateCustomization(bool success, string customData)
+    {
+        Log.Debug("ExampleTextToSpeech", "Text to Speech - Update customization response: {0}", customData);
+        _updateCustomizationTested = true;
+    }
+
+    private void OnGetCustomizationWords(Words words, string customData)
+    {
+        Log.Debug("ExampleTextToSpeech", "Text to Speech - Get customization words response: {0}", customData);
+        _getCustomizationWordsTested = true;
+    }
+
+    private void OnAddCustomizationWords(bool success, string customData)
+    {
+        Log.Debug("ExampleTextToSpeech", "Text to Speech - Add customization words response: {0}", customData);
+        _addCustomizationWordsTested = true;
+    }
+
+    private void OnDeleteCustomizationWord(bool success, string customData)
+    {
+        Log.Debug("ExampleTextToSpeech", "Text to Speech - Delete customization word response: {0}", customData);
+        _deleteCustomizationWordTested = true;
+    }
+
+    private void OnGetCustomizationWord(Translation translation, string customData)
+    {
+        Log.Debug("ExampleTextToSpeech", "Text to Speech - Get customization word response: {0}", customData);
+        _getCustomizationWordTested = true;
     }
 }


Fixed compile error.

Fixed compile error.

--- FRBDK/NewProjectCreator/NpcWpf/Managers/UnzipManager.cs
+++ FRBDK/NewProjectCreator/NpcWpf/Managers/UnzipManager.cs
@@ -16,7 +16,7 @@
         {
             bool succeeded = true;

-            succeeded = await Unzip(zipToUnpack, unpackDirectory, succeeded);
+            succeeded = Unzip(zipToUnpack, unpackDirectory, succeeded);

             if (succeeded)
             {


Added dummy ModData DataUnit to trigger the mod data extension

--- FactorioModBuilder/ViewModels/ProjectItems/ProjectVM.cs
+++ FactorioModBuilder/ViewModels/ProjectItems/ProjectVM.cs
@@ -39,7 +39,8 @@
                 var test = gres.CompilerData;
                 return new ProjectData(this.Name, this.TempDir, this.OutDir, this.Version).ListWrap()
                     .ConcatMany(miRes.CompilerData, mcRes.CompilerData,
-                        prot.CompilerData, loc.CompilerData, gres.CompilerData);
+                        prot.CompilerData, loc.CompilerData, gres.CompilerData)
+                    .Concat(new ModDataData().ListWrap());
             }
         }


Bucket.EnumerateRange refactor

Bucket.EnumerateRange refactor

--- Framework.Core/Theraot/Collections/ThreadSafe/Bucket.cs
+++ Framework.Core/Theraot/Collections/ThreadSafe/Bucket.cs
@@ -49,7 +49,14 @@

         public IEnumerable<T> EnumerateRange(int indexFrom, int indexTo)
         {
-            return _bucketCore.EnumerateRange(indexFrom, indexTo).Select(value => value == BucketHelper.Null ? default! : (T)value);
+            var range = _bucketCore.EnumerateRange(indexFrom, indexTo);
+
+            static T Selector(object value)
+            {
+                return value == BucketHelper.Null ? default! : (T)value;
+            }
+
+            return range.Select(Selector);
         }

         public bool Exchange(int index, T item, [MaybeNullWhen(true)] out T previous)


Format

Format

--- src/Miningcore/Blockchain/Cryptonote/CryptonotePayoutHandler.cs
+++ src/Miningcore/Blockchain/Cryptonote/CryptonotePayoutHandler.cs
@@ -425,7 +425,8 @@
             return Task.FromResult(true);
         }

-        public override async Task<decimal> UpdateBlockRewardBalancesAsync(IDbConnection con, IDbTransaction tx, IMiningPool pool, Block block, CancellationToken ct)
+        public override async Task<decimal> UpdateBlockRewardBalancesAsync(IDbConnection con, IDbTransaction tx,
+            IMiningPool pool, Block block, CancellationToken ct)
         {
             var blockRewardRemaining = await base.UpdateBlockRewardBalancesAsync(con, tx, pool, block, ct);


set ModifiedDate to UtcNow

set ModifiedDate to UtcNow

--- src/ServiceStack.ServiceInterface/Auth/OrmLiteAuthRepository.cs
+++ src/ServiceStack.ServiceInterface/Auth/OrmLiteAuthRepository.cs
@@ -189,8 +189,8 @@
 				if (userAuth.Id == default(int) && !authSession.UserAuthId.IsNullOrEmpty())
 					userAuth.Id = int.Parse(authSession.UserAuthId);

-				userAuth.ModifiedDate = userAuth.ModifiedDate;
-				if (userAuth.CreatedDate == default(DateTime))
+                userAuth.ModifiedDate = DateTime.UtcNow;
+                if (userAuth.CreatedDate == default(DateTime))
 					userAuth.CreatedDate = userAuth.ModifiedDate;

 				dbCmd.Save(userAuth);


#H5IS

--- src/Skybrud.Umbraco.BorgerDk/Models/BorgerDkArticleSelection.cs
+++ src/Skybrud.Umbraco.BorgerDk/Models/BorgerDkArticleSelection.cs
@@ -110,8 +110,8 @@
             Header = obj.GetString("header");
             Selected = obj.GetStringArray("selected");
             Article = BorgerDkCachedArticle.Load(Municipality, Domain, Id);
-            Blocks = (Article.Exists ? new BorgerDkCachedTextElement[0] : Article.Blocks.Where(IsSelected).ToArray());
-            MicroArticles = (Article.Exists ? new BorgerDkCachedMicroArticle[0] : Article.MicroArticles.Where(IsSelected).ToArray());
+            Blocks = (Article.Exists ? Article.Blocks.Where(IsSelected).ToArray() : new BorgerDkCachedTextElement[0]);
+            MicroArticles = (Article.Exists ? Article.MicroArticles.Where(IsSelected).ToArray() : new BorgerDkCachedMicroArticle[0]);
         }

         #endregion


Fixing NRE.

Fixing NRE.

--- src/StructAnalyzers/StructAnalyzers/HiddenStructCopyAnalyzer.cs
+++ src/StructAnalyzers/StructAnalyzers/HiddenStructCopyAnalyzer.cs
@@ -68,8 +68,8 @@
         {
             if (targetSymbol is IMethodSymbol ms && ms.IsExtensionMethod &&
                 // MethodSymbol itself has no parameters, need to go through ReducedFrom property.
-                ms.ReducedFrom.Parameters[0].RefKind == RefKind.None &&
-                ms.ReceiverType.IsValueType && ms.ReceiverType.TypeKind != TypeKind.Enum)
+                ms.ReducedFrom?.Parameters[0].RefKind == RefKind.None &&
+                ms.ReceiverType?.IsValueType == true && ms.ReceiverType?.TypeKind != TypeKind.Enum)
             {
                 Debug.Assert(name != null);
                 // The expression calls an extension method that takes a struct by value.


change resource name variable to private

--- src/Take.Blip.Builder/Variables/BaseResourceVariableProvider.cs
+++ src/Take.Blip.Builder/Variables/BaseResourceVariableProvider.cs
@@ -14,7 +14,7 @@
     {
         private readonly ISender _sender;
         private readonly IDocumentSerializer _documentSerializer;
-        protected readonly string _resourceName;
+        private readonly string _resourceName;
         public VariableSource Source => throw new NotImplementedException();

         public BaseResourceVariableProvider(ISender sender, IDocumentSerializer documentSerializer, string resourceName)


Specify namespace for CharITem

Specify namespace for CharITem

--- src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs
+++ src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs
@@ -19,7 +19,7 @@
         internal const string StaticConvertUrlsToAscii = "try";
         internal const bool StaticEnableDefaultCharReplacements = true;

-        internal static readonly CharItem[] DefaultCharCollection =
+        internal static readonly Umbraco.Cms.Core.Configuration.Models.CharItem[] DefaultCharCollection =
         {
             new () { Char = " ", Replacement = "-" },
             new () { Char = "\"", Replacement = string.Empty },
@@ -84,9 +84,9 @@
         /// <summary>
         /// Add additional character replacements, or override defaults
         /// </summary>
-        public IEnumerable<CharItem> UserDefinedCharCollection { get; set; }
+        public IEnumerable<Umbraco.Cms.Core.Configuration.Models.CharItem> UserDefinedCharCollection { get; set; }

-        [Obsolete("Use CharItem in the Umbraco.Cms.Core.Configuration.Models namespace instead.")]
+        [Obsolete("Use CharItem in the Umbraco.Cms.Core.Configuration.Models namespace instead. Scheduled for removal in V10.")]
         public class CharItem : IChar
         {
             /// <inheritdoc/>


need to redo blob upload from scratch to support high quality resized jpegs and to fix large jpegs

--- src/FODT.DataMigration/Program.cs
+++ src/FODT.DataMigration/Program.cs
@@ -28,6 +28,7 @@
         private static string azureStorageAccountKey = "";

         private static bool doDatabaseImport = true;
+        private static bool doFixLargePhotoFlag = false;
         private static bool doBlobUpload = false;

         private static readonly Encoding blobEncoding = Encoding.GetEncoding(1252);
@@ -35,6 +36,7 @@
         public static void Main(string[] args)
         {
             log4net.Config.XmlConfigurator.Configure();
+            Log("Starting Up...");

             azureStorageAccountName = ConfigurationManager.AppSettings["azure-storage-account-name"];
             azureStorageAccountKey = ConfigurationManager.AppSettings["azure-storage-account-key"];
@@ -44,6 +46,7 @@
             var cfg = DatabaseBootstrapper.Bootstrap(connectionString);
             sessionFactory = cfg.BuildSessionFactory();

+            Log("Opening Connection to Old FODT DB");
             oldDatabaseConnection = new MySql.Data.MySqlClient.MySqlConnection(ConfigurationManager.AppSettings["db_old_fodt"]);
             oldDatabaseConnection.Open();

@@ -62,6 +65,10 @@
                 ImportEC();
                 FixInsertedDateTimeColumns();
             }
+            if (doFixLargePhotoFlag)
+            {
+                FixLargePhotoFlag();
+            }
             if (doBlobUpload)
             {
                 ImportPhotoBlobs();
@@ -267,6 +274,48 @@
             }
         }

+        private static void FixLargePhotoFlag()
+        {
+            var rootPhotoPath = @"http://imdt.friendsofdt.org/";
+
+            var media_items = oldDatabaseConnection.Query("SELECT * FROM media_items").ToList();
+            Log("Checking " + media_items.Count + " Media Blobs For Large Images");
+
+            var count = 0;
+            foreach (var _row in media_items)
+            {
+                if (_row.guid == null)
+                {
+                    throw new InvalidOperationException("Media Item is Missing GUID. Row needs to be updated before Importing");
+                }
+                var photoID = (int)_row.ID;
+
+                byte[] original = null;
+                original = AzureBlogStorageUtil.DownloadPublicBlob(rootPhotoPath + _row.item.ToString().Replace("./", ""));
+
+                if (original == null)
+                {
+                    Log("Missing File!" + _row.item.ToString());
+                    continue;
+                }
+
+                using (var fullSize = ImageUtilities.LoadBitmap(original))
+                {
+                    if (fullSize.Width > 600 || fullSize.Height > 800)
+                    {
+                        // original image is too large for general display
+                        using (var session = sessionFactory.OpenSession())
+                        {
+                            session.Execute("UPDATE dbo.Photo SET LargeFileIsSameAsOriginal = 0 WHERE PhotoId = @PhotoId", new { PhotoId = photoID });
+                        }
+                        count++;
+                    }
+                }
+
+            }
+            Log("Fixed " + count + " Large Photos");
+        }
+
         private static void ImportPhotoBlobs()
         {
             var rootPhotoPath = @"http://imdt.friendsofdt.org/";
@@ -302,6 +351,14 @@
                 PutBlob(entity.GetOriginalFileName(), original);
                 PutBlob(entity.GetThumbnailFileName(), thumbnail);
                 PutBlob(entity.GetTinyFileName(), tiny);
+
+                if (fullSize.Width > 600 || fullSize.Height > 800)
+                {
+                    entity.LargeFileIsSameAsOriginal = false;
+                    // original image is too large for general display
+                    var large = ImageUtilities.GetBytes(ImageUtilities.Resize(fullSize, 600, 800), ImageFormat.Jpeg);
+                    PutBlob(entity.GetLargeFileName(), large);
+                }

                 count++;
                 if (count % 100 == 0)


Update src/Workspaces/Core/Portable/Utilities/IDictionaryExtensions.cs

Co-Authored-By: Jason Malinowski <68c46a606457643eab92053c1c05574abb26f861@jason-m.com>

--- src/Workspaces/Core/Portable/Utilities/IDictionaryExtensions.cs
+++ src/Workspaces/Core/Portable/Utilities/IDictionaryExtensions.cs
@@ -50,7 +50,7 @@
                 collection = ImmutableArray<TValue>.Empty;
             }

-            dictionary[key] = collection.IsEmpty && value == default ? defaultArray : collection.Add(value);
+            dictionary[key] = collection.IsEmpty && value == defaultArray[0] ? defaultArray : collection.Add(value);
         }

         public static void MultiRemove<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)


Fix issue #491 - test breakage on CI

Fix issue #491 - test breakage on CI

These tests include the current directory inside an xml comment. If the
path happens to contain `--`, which is not allowed inside xml comments,
then these tests break. This showed up on CI servers where the path did
include these characters!

Issue: https://github.com/Microsoft/msbuild/issues/491


minor fix.

minor fix.

--- OpenUtau.Core/Ustx/UNote.cs
+++ OpenUtau.Core/Ustx/UNote.cs
@@ -85,6 +85,9 @@
                 return;
             }
             Error = false;
+            if (track.Singer == null || !track.Singer.Loaded) {
+                Error |= true;
+            }
             if (pitch.snapFirst) {
                 if (Prev != null && Prev.End == position) {
                     pitch.data[0].Y = (Prev.tone - tone) * 10;


Remove redundant LifecycleTests coverage of error handling during class set up and tear down, because class set up and tear down are no longer owned by Fixie internally and because they are already better covered by LifecycleTests which demonstrate handling of exceptions thrown by custom Lifecycle implementations.

--- src/Fixie.Tests/LifecycleTests.cs
+++ src/Fixie.Tests/LifecycleTests.cs
@@ -123,18 +123,6 @@
                 throw new FailureException(member);
         }

-        static void ClassSetUp(Type testClass)
-        {
-            testClass.ShouldEqual(typeof(SampleTestClass));
-            WhereAmI();
-        }
-
-        static void ClassTearDown(Type testClass)
-        {
-            testClass.ShouldEqual(typeof(SampleTestClass));
-            WhereAmI();
-        }
-
         static void InstanceSetUp(object instance)
         {
             instance.GetType().ShouldEqual(typeof(SampleTestClass));
@@ -163,8 +151,6 @@
         {
             public void Execute(Type testClass, Action<CaseAction> runCases)
             {
-                ClassSetUp(testClass);
-
                 runCases(@case =>
                 {
                     var instance = Activator.CreateInstance(testClass);
@@ -204,8 +190,6 @@
                         (instance as IDisposable)?.Dispose();
                     }
                 });
-
-                ClassTearDown(testClass);
             }
         }

@@ -213,33 +197,24 @@
         {
             public void Execute(Type testClass, Action<CaseAction> runCases)
             {
-                ClassSetUp(testClass);
+                var instance = Activator.CreateInstance(testClass);
+
+                InstanceSetUp(instance);
+
+                runCases(@case =>
+                {
+                    CaseSetUp(@case);
+                    @case.Execute(instance);
+                    CaseTearDown(@case);
+                });

                 try
                 {
-                    var instance = Activator.CreateInstance(testClass);
-
-                    InstanceSetUp(instance);
-
-                    runCases(@case =>
-                    {
-                        CaseSetUp(@case);
-                        @case.Execute(instance);
-                        CaseTearDown(@case);
-                    });
-
-                    try
-                    {
-                        InstanceTearDown(instance);
-                    }
-                    finally
-                    {
-                        (instance as IDisposable)?.Dispose();
-                    }
+                    InstanceTearDown(instance);
                 }
                 finally
                 {
-                    ClassTearDown(testClass);
+                    (instance as IDisposable)?.Dispose();
                 }
             }
         }
@@ -276,10 +251,8 @@
                 "SampleTestClass.Fail failed: 'Fail' failed!");

             output.ShouldHaveLifecycle(
-                "ClassSetUp",
                 ".ctor", "InstanceSetUp", "CaseSetUp", "Pass", "CaseTearDown", "InstanceTearDown", "Dispose",
-                ".ctor", "InstanceSetUp", "CaseSetUp", "Fail", "CaseTearDown", "InstanceTearDown", "Dispose",
-                "ClassTearDown");
+                ".ctor", "InstanceSetUp", "CaseSetUp", "Fail", "CaseTearDown", "InstanceTearDown", "Dispose");
         }

         public void ShouldAllowConstructingPerClassUsingLifecycleType()
@@ -293,12 +266,10 @@
                 "SampleTestClass.Fail failed: 'Fail' failed!");

             output.ShouldHaveLifecycle(
-                "ClassSetUp",
                 ".ctor", "InstanceSetUp",
                 "CaseSetUp", "Pass", "CaseTearDown",
                 "CaseSetUp", "Fail", "CaseTearDown",
-                "InstanceTearDown", "Dispose",
-                "ClassTearDown");
+                "InstanceTearDown", "Dispose");
         }

         public void ShouldAllowConstructingPerCaseUsingLifecycleInstance()
@@ -312,10 +283,8 @@
                 "SampleTestClass.Fail failed: 'Fail' failed!");

             output.ShouldHaveLifecycle(
-                "ClassSetUp",
                 ".ctor", "InstanceSetUp", "CaseSetUp", "Pass", "CaseTearDown", "InstanceTearDown", "Dispose",
-                ".ctor", "InstanceSetUp", "CaseSetUp", "Fail", "CaseTearDown", "InstanceTearDown", "Dispose",
-                "ClassTearDown");
+                ".ctor", "InstanceSetUp", "CaseSetUp", "Fail", "CaseTearDown", "InstanceTearDown", "Dispose");
         }

         public void ShouldAllowConstructingPerClassUsingLifecycleInstance()
@@ -329,12 +298,10 @@
                 "SampleTestClass.Fail failed: 'Fail' failed!");

             output.ShouldHaveLifecycle(
-                "ClassSetUp",
                 ".ctor", "InstanceSetUp",
                 "CaseSetUp", "Pass", "CaseTearDown",
                 "CaseSetUp", "Fail", "CaseTearDown",
-                "InstanceTearDown", "Dispose",
-                "ClassTearDown");
+                "InstanceTearDown", "Dispose");
         }

         public void ShouldAllowConstructingPerCaseUsingLifecycleAction()
@@ -470,38 +437,6 @@
             output.ShouldHaveLifecycle("Unsafe class lifecycle");
         }

-        public void ShouldShortCircuitInnerBehaviorAndTearDownByFailingCasesWhenConstructingPerCaseAndClassSetUpThrows()
-        {
-            FailDuring("ClassSetUp");
-
-            Convention.ClassExecution.Lifecycle<CreateInstancePerCase>();
-
-            var output = Run();
-
-            output.ShouldHaveResults(
-                "SampleTestClass.Pass failed: 'ClassSetUp' failed!",
-                "SampleTestClass.Fail failed: 'ClassSetUp' failed!");
-
-            output.ShouldHaveLifecycle(
-                "ClassSetUp");
-        }
-
-        public void ShouldShortCircuitInnerBehaviorAndTearDownByFailingAllCasesWhenConstructingPerClassAndClassSetUpThrows()
-        {
-            FailDuring("ClassSetUp");
-
-            Convention.ClassExecution.Lifecycle<CreateInstancePerClass>();
-
-            var output = Run();
-
-            output.ShouldHaveResults(
-                "SampleTestClass.Pass failed: 'ClassSetUp' failed!",
-                "SampleTestClass.Fail failed: 'ClassSetUp' failed!");
-
-            output.ShouldHaveLifecycle(
-                "ClassSetUp");
-        }
-
         public void ShouldShortCircuitInnerBehaviorAndTearDownByFailingCaseWhenConstructingPerCaseAndInstanceSetUpThrows()
         {
             FailDuring("InstanceSetUp");
@@ -515,14 +450,12 @@
                 "SampleTestClass.Fail failed: 'InstanceSetUp' failed!");

             output.ShouldHaveLifecycle(
-                "ClassSetUp",
                 ".ctor",
                 "InstanceSetUp",
                 "Dispose",
                 ".ctor",
                 "InstanceSetUp",
-                "Dispose",
-                "ClassTearDown");
+                "Dispose");
         }

         public void ShouldShortCircuitInnerBehaviorAndTearDownByFailingAllCasesWhenConstructingPerClassAndInstanceSetUpThrows()
@@ -538,10 +471,8 @@
                 "SampleTestClass.Fail failed: 'InstanceSetUp' failed!");

             output.ShouldHaveLifecycle(
-                "ClassSetUp",
-                ".ctor",
-                "InstanceSetUp",
-                "ClassTearDown");
+                ".ctor",
+                "InstanceSetUp");
         }

         public void ShouldFailCaseWhenConstructingPerCaseAndInstanceTearDownThrows()
@@ -558,7 +489,6 @@
                 "    Secondary Failure: 'InstanceTearDown' failed!");

             output.ShouldHaveLifecycle(
-                "ClassSetUp",
                 ".ctor",
                 "InstanceSetUp",
                 "CaseSetUp", "Pass", "CaseTearDown",
@@ -568,8 +498,7 @@
                 "InstanceSetUp",
                 "CaseSetUp", "Fail", "CaseTearDown",
                 "InstanceTearDown",
-                "Dispose",
-                "ClassTearDown");
+                "Dispose");
         }

         public void ShouldFailAllCasesWhenConstructingPerClassAndInstanceTearDownThrows()
@@ -586,58 +515,12 @@
                 "    Secondary Failure: 'InstanceTearDown' failed!");

             output.ShouldHaveLifecycle(
-                "ClassSetUp",
                 ".ctor",
                 "InstanceSetUp",
                 "CaseSetUp", "Pass", "CaseTearDown",
                 "CaseSetUp", "Fail", "CaseTearDown",
                 "InstanceTearDown",
-                "Dispose",
-                "ClassTearDown");
-        }
-
-        public void ShouldFailCaseWhenConstructingPerCaseAndClassTearDownThrows()
-        {
-            FailDuring("ClassTearDown");
-
-            Convention.ClassExecution.Lifecycle<CreateInstancePerCase>();
-
-            var output = Run();
-
-            output.ShouldHaveResults(
-                "SampleTestClass.Pass failed: 'ClassTearDown' failed!",
-                "SampleTestClass.Fail failed: 'Fail' failed!" + Environment.NewLine +
-                "    Secondary Failure: 'ClassTearDown' failed!");
-
-            output.ShouldHaveLifecycle(
-                "ClassSetUp",
-                ".ctor", "InstanceSetUp", "CaseSetUp", "Pass", "CaseTearDown", "InstanceTearDown", "Dispose",
-                ".ctor", "InstanceSetUp", "CaseSetUp", "Fail", "CaseTearDown", "InstanceTearDown", "Dispose",
-                "ClassTearDown");
-        }
-
-        public void ShouldFailAllCasesWhenConstructingPerClassAndClassTearDownThrows()
-        {
-            FailDuring("ClassTearDown");
-
-            Convention.ClassExecution.Lifecycle<CreateInstancePerClass>();
-
-            var output = Run();
-
-            output.ShouldHaveResults(
-                "SampleTestClass.Pass failed: 'ClassTearDown' failed!",
-                "SampleTestClass.Fail failed: 'Fail' failed!" + Environment.NewLine +
-                "    Secondary Failure: 'ClassTearDown' failed!");
-
-            output.ShouldHaveLifecycle(
-                "ClassSetUp",
-                ".ctor",
-                "InstanceSetUp",
-                "CaseSetUp", "Pass", "CaseTearDown",
-                "CaseSetUp", "Fail", "CaseTearDown",
-                "InstanceTearDown",
-                "Dispose",
-                "ClassTearDown");
+                "Dispose");
         }

         public void ShouldFailCaseWhenConstructingPerCaseAndCaseLifecycleThrows()
@@ -767,7 +650,6 @@
                 "SampleTestClass.Fail failed: 'CaseSetUp' failed!");

             output.ShouldHaveLifecycle(
-                "ClassSetUp",
                 ".ctor",
                 "InstanceSetUp",
                 "CaseSetUp",
@@ -777,8 +659,7 @@
                 "InstanceSetUp",
                 "CaseSetUp",
                 "InstanceTearDown",
-                "Dispose",
-                "ClassTearDown");
+                "Dispose");
         }

         public void ShouldShortCircuitInnerBehaviorAndTearDownByFailingAllCasesWhenConstructingPerClassAndCaseSetUpThrows()
@@ -794,14 +675,12 @@
                 "SampleTestClass.Fail failed: 'CaseSetUp' failed!");

             output.ShouldHaveLifecycle(
-                "ClassSetUp",
                 ".ctor",
                 "InstanceSetUp",
                 "CaseSetUp",
                 "CaseSetUp",
                 "InstanceTearDown",
-                "Dispose",
-                "ClassTearDown");
+                "Dispose");
         }

         public void ShouldFailCaseWhenConstructingPerCaseAndCaseTearDownThrows()
@@ -818,7 +697,6 @@
                 "    Secondary Failure: 'CaseTearDown' failed!");

             output.ShouldHaveLifecycle(
-                "ClassSetUp",
                 ".ctor",
                 "InstanceSetUp",
                 "CaseSetUp", "Pass", "CaseTearDown",
@@ -828,8 +706,7 @@
                 "InstanceSetUp",
                 "CaseSetUp", "Fail", "CaseTearDown",
                 "InstanceTearDown",
-                "Dispose",
-                "ClassTearDown");
+                "Dispose");
         }

         public void ShouldFailAllCasesWhenConstructingPerClassAndCaseTearDownThrows()
@@ -846,14 +723,12 @@
                 "    Secondary Failure: 'CaseTearDown' failed!");

             output.ShouldHaveLifecycle(
-                "ClassSetUp",
                 ".ctor",
                 "InstanceSetUp",
                 "CaseSetUp", "Pass", "CaseTearDown",
                 "CaseSetUp", "Fail", "CaseTearDown",
                 "InstanceTearDown",
-                "Dispose",
-                "ClassTearDown");
+                "Dispose");
         }

         public void ShouldSkipConstructingPerCaseWhenAllCasesSkipped()
@@ -930,10 +805,8 @@
                 "    Secondary Failure: 'Dispose' failed!");

             output.ShouldHaveLifecycle(
-                "ClassSetUp",
                 ".ctor", "InstanceSetUp", "CaseSetUp", "Pass", "CaseTearDown", "InstanceTearDown", "Dispose",
-                ".ctor", "InstanceSetUp", "CaseSetUp", "Fail", "CaseTearDown", "InstanceTearDown", "Dispose",
-                "ClassTearDown");
+                ".ctor", "InstanceSetUp", "CaseSetUp", "Fail", "CaseTearDown", "InstanceTearDown", "Dispose");
         }

         public void ShouldFailAllCasesWhenConstructingPerClassAndDisposeThrows()
@@ -950,19 +823,17 @@
                 "    Secondary Failure: 'Dispose' failed!");

             output.ShouldHaveLifecycle(
-                "ClassSetUp",
                 ".ctor",
                 "InstanceSetUp",
                 "CaseSetUp", "Pass", "CaseTearDown",
                 "CaseSetUp", "Fail", "CaseTearDown",
                 "InstanceTearDown",
-                "Dispose",
-                "ClassTearDown");
+                "Dispose");
         }

         public void ShouldIncludeAllTearDownAndDisposalExceptionsInResultWhenConstructingPerCase()
         {
-            FailDuring("ClassTearDown", "InstanceTearDown", "CaseTearDown", "Dispose");
+            FailDuring("InstanceTearDown", "CaseTearDown", "Dispose");

             Convention.ClassExecution.Lifecycle<CreateInstancePerCase>();

@@ -971,17 +842,13 @@
             output.ShouldHaveResults(
                 "SampleTestClass.Pass failed: 'CaseTearDown' failed!" + NewLine +
                 "    Secondary Failure: 'InstanceTearDown' failed!" + NewLine +
-                "    Secondary Failure: 'Dispose' failed!" + NewLine +
-                "    Secondary Failure: 'ClassTearDown' failed!",
+                "    Secondary Failure: 'Dispose' failed!",
                 "SampleTestClass.Fail failed: 'Fail' failed!" + NewLine +
                 "    Secondary Failure: 'CaseTearDown' failed!" + NewLine +
                 "    Secondary Failure: 'InstanceTearDown' failed!" + NewLine +
-                "    Secondary Failure: 'Dispose' failed!" + NewLine +
-                "    Secondary Failure: 'ClassTearDown' failed!");
-
-            output.ShouldHaveLifecycle(
-                "ClassSetUp",
-
+                "    Secondary Failure: 'Dispose' failed!");
+
+            output.ShouldHaveLifecycle(
                 ".ctor",
                 "InstanceSetUp",
                 "CaseSetUp",
@@ -996,14 +863,12 @@
                 "Fail",
                 "CaseTearDown",
                 "InstanceTearDown",
-                "Dispose",
-
-                "ClassTearDown");
+                "Dispose");
         }

         public void ShouldIncludeAllPossibleTearDownExceptionsInResultWhenConstructingPerClass()
         {
-            FailDuring("ClassTearDown", "InstanceTearDown", "CaseTearDown", "Dispose");
+            FailDuring("InstanceTearDown", "CaseTearDown", "Dispose");

             Convention.ClassExecution.Lifecycle<CreateInstancePerClass>();

@@ -1016,13 +881,12 @@

             output.ShouldHaveResults(
                 "SampleTestClass.Pass failed: 'CaseTearDown' failed!" + NewLine +
-                "    Secondary Failure: 'ClassTearDown' failed!",
+                "    Secondary Failure: 'Dispose' failed!",
                 "SampleTestClass.Fail failed: 'Fail' failed!" + NewLine +
                 "    Secondary Failure: 'CaseTearDown' failed!" + NewLine +
-                "    Secondary Failure: 'ClassTearDown' failed!");
-
-            output.ShouldHaveLifecycle(
-                "ClassSetUp",
+                "    Secondary Failure: 'Dispose' failed!");
+
+            output.ShouldHaveLifecycle(
                 ".ctor",

                 "InstanceSetUp",
@@ -1035,8 +899,7 @@
                 "CaseTearDown",
                 "InstanceTearDown",

-                "Dispose",
-                "ClassTearDown");
+                "Dispose");
         }

         public void ShouldAllowProcessingTestCaseLifecycleMultipleTimes()


foreach-variable & foreach-method regression tests now pass

--- IronVelocity.Tests/TemplateExecution/RegressionTests.cs
+++ IronVelocity.Tests/TemplateExecution/RegressionTests.cs
@@ -1,4 +1,5 @@
 using NUnit.Framework;
+using System.Collections;
 using System.Collections.Generic;
 using System.IO;

@@ -58,13 +59,14 @@
         {
             var context = new Dictionary<string, object>
             {
-                ["provider"] = new Provider()
+                ["provider"] = new Provider(),
+                ["stringarray"] = new[] { "first element", "second element" },
             };

             switch (name)
             {
-                case "diabolical":
-                    context["stringarray"] = new[] { "first element", "second element" };
+                case "foreach-variable":
+                    context["list"] = new Provider().Customers;
                     break;
             }

@@ -104,6 +106,7 @@
         private class Provider
         {
             public string Chop(string input, int count) => input.Substring(0, input.Length - count);
+            public ArrayList Customers => new ArrayList { "ArrayList element 1", "ArrayList element 2", "ArrayList element 3", "ArrayList element 4" };
         }
     }
 }


Checkpoint:   Fix ComputeRecursiveExitLabel not aborting when a cycle is detected   Fix ControlFlowSimplifier not handling nested label groups   Remove a Debugger.Break

--- JSIL/Transforms/StaticAnalysis/ControlFlowSimplifier.cs
+++ JSIL/Transforms/StaticAnalysis/ControlFlowSimplifier.cs
@@ -155,16 +155,19 @@

         public void VisitNode (JSGotoExpression ge) {
             if (LabelGroupStack.Count > 0) {
-                var data = LabelGroupStack.Peek();
                 var enclosingLabelledStatement = Stack.OfType<JSStatement>().LastOrDefault((n) => n.Label != null);

                 if (enclosingLabelledStatement != null) {
-                    var labelData = data[enclosingLabelledStatement.Label];
-
-                    if (ge is JSExitLabelGroupExpression) {
-                        labelData.UntargettedExitCount += 1;
-                    } else {
-                        labelData.ExitTargetLabels.Add(ge.TargetLabel);
+                    foreach (var lg in LabelGroupStack) {
+                        LabelGroupLabelData labelData;
+
+                        if (lg.TryGetValue(enclosingLabelledStatement.Label, out labelData)) {
+                            if (ge is JSExitLabelGroupExpression) {
+                                labelData.UntargettedExitCount += 1;
+                            } else {
+                                labelData.ExitTargetLabels.Add(ge.TargetLabel);
+                            }
+                        }
                     }
                 }
             }
@@ -194,6 +197,10 @@
                 } else {
                     recursiveExit = targetLabelData.DirectExitLabel;
                 }
+
+                // Cycle detected
+                if (recursiveExit == label)
+                    return null;
             }

             return null;
@@ -290,7 +297,8 @@

                 if (exitLabel != null) {
                     if (exitLabel.Label != onlyRecursiveExitTarget) {
-                        Debugger.Break();
+                        if (TraceLevel >= 1)
+                            Console.WriteLine("// Cannot mark label '{0}' as exit label because this labelgroup already has one", onlyRecursiveExitTarget);
                     }
                 } else {
                     if (TraceLevel >= 1)


Fix typo in mock instance

Fix typo in mock instance

--- KenticoInspector.Reports.Tests/Helpers/MockInstances.cs
+++ KenticoInspector.Reports.Tests/Helpers/MockInstances.cs
@@ -16,7 +16,7 @@

         public static Instance Kentico10 = new Instance
         {
-            Name = "K11 Test Instance",
+            Name = "K10 Test Instance",
             Guid = Guid.NewGuid(),
             Path = "C:\\inetpub\\wwwroot\\Kentico10",
             Url = "http://kentico10.com",


(GH-349) Ignore PowerShell InitializeDefaultDrives

If you have a network drive that is not available or has been
disconnected, PowerShell will happily throw an error about it with the
following message: "Attempting to perform the InitializeDefaultDrives
operation on the 'FileSystem' provider failed." Since it is not really
an error, we should log the message accordingly and move on, but not
fail the choco install due to some crazy warning that for some reason
is an error message.

--- src/chocolatey/infrastructure.app/services/PowershellService.cs
+++ src/chocolatey/infrastructure.app/services/PowershellService.cs
@@ -32,6 +32,7 @@
         private readonly IFileSystem _fileSystem;
         private readonly string _customImports;
         private const string OPERATION_COMPLETED_SUCCESSFULLY = "The operation completed successfully.";
+        private const string INITIALIZE_DEFAULT_DRIVES = "Attempting to perform the InitializeDefaultDrives operation on the 'FileSystem' provider failed.";

         public PowershellService(IFileSystem fileSystem)
             : this(fileSystem, new CustomString(string.Empty))
@@ -275,7 +276,7 @@
                         (s, e) =>
                             {
                                 if (string.IsNullOrWhiteSpace(e.Data)) return;
-                                if (e.Data.is_equal_to(OPERATION_COMPLETED_SUCCESSFULLY))
+                                if (e.Data.is_equal_to(OPERATION_COMPLETED_SUCCESSFULLY) || e.Data.is_equal_to(INITIALIZE_DEFAULT_DRIVES))
                                 {
                                     this.Log().Info(() => " " + e.Data);
                                 }


AngleContained renamed to AngleInRange

AngleContained renamed to AngleInRange

--- src/Arc3D.cs
+++ src/Arc3D.cs
@@ -239,7 +239,7 @@
                 // if not in circle stop
                 if (!this.Contains(tolLen, pt)) return false;

-                return PtAngle(tolLen, pt).AngleContained(tolRad, AngleStartRad, AngleEndRad);
+                return PtAngle(tolLen, pt).AngleInRange(tolRad, AngleStartRad, AngleEndRad);
             }

             /// <summary>
@@ -405,7 +405,7 @@
         /// where angle_from assumed smaller angle
         /// and angle_to gets normalized taking in account 2*PI difference when angle_to < angle_from
         /// </summary>
-        public static bool AngleContained(this double pt_angle, double tol_rad, double angle_from, double angle_to)
+        public static bool AngleInRange(this double pt_angle, double tol_rad, double angle_from, double angle_to)
         {
             if (pt_angle.LessThanTol(tol_rad, angle_from)) pt_angle += 2 * PI;


Make the properties of the OfflinePackProgress struct public so they can be used

--- XPlat/Mapbox/iOS/source/MapboxSDK.iOS/StructsAndEnums.cs
+++ XPlat/Mapbox/iOS/source/MapboxSDK.iOS/StructsAndEnums.cs
@@ -79,12 +79,12 @@
     [StructLayout (LayoutKind.Sequential)]
     public struct OfflinePackProgress
     {
-        ulong CountOfResourcesCompleted;
-        ulong CountOfBytesCompleted;
-        ulong CountOfTilesCompleted;
-        ulong CountOfTileBytesCompleted;
-        ulong CountOfResourcesExpected;
-        ulong MaximumResourcesExpected;
+        public ulong CountOfResourcesCompleted;
+        public ulong CountOfBytesCompleted;
+        public ulong CountOfTilesCompleted;
+        public ulong CountOfTileBytesCompleted;
+        public ulong CountOfResourcesExpected;
+        public ulong MaximumResourcesExpected;
     }

 	[Native]


Fixed name of the previous IsGuidFieldEmpty method.

--- source/trunk/Windows/Figlut.Server.Toolkit.45/Web/MVC/Models/FiglutEntityModel.cs
+++ source/trunk/Windows/Figlut.Server.Toolkit.45/Web/MVC/Models/FiglutEntityModel.cs
@@ -33,7 +33,7 @@

         #region Int Validation

-        public bool IsGuidFieldEmpty(string fieldName, Guid fieldValue, out string errorMessage)
+        public bool IsGuidFieldNotEmpty(string fieldName, Guid fieldValue, out string errorMessage)
         {
             errorMessage = null;
             if (fieldValue == Guid.Empty)


Travis/Mono compile fix

Travis/Mono compile fix

--- OxidePatcher/PatcherForm.cs
+++ OxidePatcher/PatcherForm.cs
@@ -568,7 +568,7 @@
         private void objectview_ItemDrag(object sender, ItemDragEventArgs e)
         {
             var node = e.Item as TreeNode;
-            if (!(node?.Tag is Hook)) return;
+            if (node?.Tag != null && !(node.Tag is Hook)) return;

             dragNode = (TreeNode) e.Item;


R: remove commented out code and unused using

--- Pocket.Logger/Disposable.cs
+++ Pocket.Logger/Disposable.cs
@@ -1,6 +1,5 @@
 using System;
 using System.Collections;
-using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Linq;
@@ -68,11 +67,6 @@
                 disposables.Remove(disposable);
                 disposable.Dispose();
             }
-//
-//            while (disposables.TryTake(out var disposable))
-//            {
-//                disposable.Dispose();
-//            }
         }

         public IEnumerator<IDisposable> GetEnumerator() => disposables.GetEnumerator();


MessageLength not messageLen

MessageLength not messageLen

--- libsodium-net/GenericHash.cs
+++ libsodium-net/GenericHash.cs
@@ -138,7 +138,7 @@
     private static extern int _GenericHash(byte[] buffer, int bufferLength, byte[] message, long messageLength, byte[] key, int keyLength);

     [DllImport(SodiumCore.LIBRARY_NAME, EntryPoint = "crypto_generichash_blake2b_salt_personal", CallingConvention = CallingConvention.Cdecl)]
-    private static extern int _GenericHashSaltPersonal(byte[] buffer, int bufferLength, byte[] message, long messageLen, byte[] key, int keyLength, byte[] salt, byte[] personal);
+    private static extern int _GenericHashSaltPersonal(byte[] buffer, int bufferLength, byte[] message, long messageLength, byte[] key, int keyLength, byte[] salt, byte[] personal);

   }
 }


Members bug fix

Members bug fix

--- src/GiveCRM.DataAccess/Members.cs
+++ src/GiveCRM.DataAccess/Members.cs
@@ -45,7 +45,8 @@
                     member = record;
                     member.PhoneNumbers = new List<PhoneNumber>();
                 }
-                member.PhoneNumbers.Add(new PhoneNumber { Id = record.PhoneNumberId, MemberId = member.Id, Number = record.Number, Type = record.Type });
+
+                member.PhoneNumbers.Add(new PhoneNumber { Id = record.PhoneNumberId ?? 0, MemberId = member.Id, Number = record.Number ?? string.Empty, Type = record.Type ?? string.Empty });
             }

             yield return member;


Fix typo in header

Fix typo in header

--- src/Hyena/Hyena.Metrics/Sample.cs
+++ src/Hyena/Hyena.Metrics/Sample.cs
@@ -1,5 +1,5 @@
 //
-// Metric.cs
+// Sample.cs
 //
 // Author:
 //   Gabriel Burt <gabriel.burt@gmail.com>


[facebook][android] Update to v4.25

[facebook][android] Update to v4.25

--- Facebook.Android/build.cake
+++ Facebook.Android/build.cake
@@ -1,14 +1,14 @@

 #load "../common.cake"

-var FB_NUGET_VERSION = "4.24.0";
-var AN_NUGET_VERSION = "4.24.0";
+var FB_NUGET_VERSION = "4.25.0";
+var AN_NUGET_VERSION = "4.25.0";

-var FB_VERSION = "4.24.0";
+var FB_VERSION = "4.25.0";
 var FB_URL = string.Format ("http://search.maven.org/remotecontent?filepath=com/facebook/android/facebook-android-sdk/{0}/facebook-android-sdk-{0}.aar", FB_VERSION);
 var FB_DOCS_URL = string.Format ("http://search.maven.org/remotecontent?filepath=com/facebook/android/facebook-android-sdk/{0}/facebook-android-sdk-{0}-javadoc.jar", FB_VERSION);

-var AN_VERSION = "4.24.0";
+var AN_VERSION = "4.25.0";
 var AN_URL = string.Format ("http://search.maven.org/remotecontent?filepath=com/facebook/android/audience-network-sdk/{0}/audience-network-sdk-{0}.aar", AN_VERSION);

 var TARGET = Argument ("t", Argument ("target", "Default"));


Anonymous type sources

Anonymous type sources

--- LatexScriptWrapper/ExtensionMethods/AnonymousTypeHelper.cs
+++ LatexScriptWrapper/ExtensionMethods/AnonymousTypeHelper.cs
@@ -4,12 +4,19 @@
 using System.Linq;
 using System.Reflection;
 using System.Runtime.CompilerServices;
-using System.Text;

 namespace ExtensionMethods
 {
     public static class AnonymousTypeHelper
     {
+        /// <summary>
+        /// source: http://stackoverflow.com/questions/2630370/c-sharp-dynamic-cannot-access-properties-from-anonymous-types-declared-in-anot
+        /// with little modifications
+        ///  - recursive
+        ///  - check for anonymous type
+        /// </summary>
+        /// <param name="obj"></param>
+        /// <returns></returns>
         public static object ToExpandoObjectIfNecessary(this object obj)
         {
             if (obj == null)
@@ -32,13 +39,33 @@
             return expandoObj as ExpandoObject;
         }

-        public static Boolean IsAnonymousType(this Type type)
+
+        /// <summary>
+        /// Determine through reflection if this type is an compiler generated anonymous type
+        ///
+        /// There is no C# language construct which allows you to say
+        /// "Is this an anonymous type". You can use a simple heuristic
+        /// to approximate if a type is an anonymous type, but it's possible
+        /// to get tricked by people hand coding IL, or using a language where
+        /// such characters as > and < are valid in identifiers.
+        ///
+        /// source: http://stackoverflow.com/questions/2483023/how-to-test-if-a-type-is-anonymous
+        /// </summary>
+        /// <param name="type">the type to check</param>
+        /// <returns>true if the passed type is a compiler generated anonymous type</returns>
+        /// <remarks>This code is copied from http://www.liensberger.it/web/blog/?p=191 </remarks>
+        public static bool IsAnonymousType(this Type type)
         {
-            Boolean hasCompilerGeneratedAttribute = type.GetCustomAttributes(typeof(CompilerGeneratedAttribute), false).Count() > 0;
-            Boolean nameContainsAnonymousType = type.FullName.Contains("AnonymousType");
-            Boolean isAnonymousType = hasCompilerGeneratedAttribute && nameContainsAnonymousType;
+            if (type == null)
+                throw new ArgumentNullException("type");

-            return isAnonymousType;
+            // TODO: The only way to detect anonymous types right now.
+            return Attribute.IsDefined(type, typeof(CompilerGeneratedAttribute), false)
+                   && type.IsGenericType
+                   && type.Name.Contains("AnonymousType")
+                   && (type.Name.StartsWith("<>", StringComparison.OrdinalIgnoreCase) || type.Name.StartsWith("VB$", StringComparison.OrdinalIgnoreCase))
+                   && (type.Attributes & TypeAttributes.NotPublic) == TypeAttributes.NotPublic;
         }
+
     }
 }


Minor optimizations in AssemblyLocatorVisitor


Write entire file path in file

Write entire file path in file

--- PHPAnalysis/FileWriter.Plugin/FileVulnerabilityReporter.cs
+++ PHPAnalysis/FileWriter.Plugin/FileVulnerabilityReporter.cs
@@ -50,7 +50,7 @@
         {
             WriteBeginVulnerability();
             WriteInfoLine("Message: " + vulnerabilityInfo.Message);
-            WriteInfoLine("Include stack: " + String.Join(_stackSeperator, vulnerabilityInfo.IncludeStack));
+            WriteInfoLine("Include stack: " + String.Join(_stackSeperator, vulnerabilityInfo.IncludeStack.Select(f => f.FullPath)));
             WriteInfo("Call stack: " + String.Join(_stackSeperator, vulnerabilityInfo.CallStack.Select(c => c.Name)));
             WriteFilePath(vulnerabilityInfo);
             WriteEndVulnerability();


reverted UserFile changes

reverted UserFile changes

--- RelhaxModpack/RelhaxModpack/DatabaseComponents/UserFile.cs
+++ RelhaxModpack/RelhaxModpack/DatabaseComponents/UserFile.cs
@@ -10,13 +10,21 @@
         // this could be a single file or a search pattern with * or ?
         public string Pattern = "";

+        //TEMP MAKE stuff below that's to remove properties so it's not picked up by fieldInfo
+
+        // will try to speed up the restore backup function in case of ClanIcons, the "backup folder" will be pushed back at once (and not file by file)
+        public bool placeBeforeExtraction { get; set; } = false;//TODO: remove?
+
+        // this entry will be pßroceeded in any case (if package is checked), even if "save user data" option is "false"
+        public bool systemInitiated { get; set; } = false;//TODO: remove
+
         //make this a property to be ignored also by xml saving
         //contain the list of actuall files saved. it's the full path inlcuding the file name
         public List<string> Files_saved { get; set; } = new List<string>();

         public override string ToString()
         {
-            return Pattern;
+            return Pattern + (placeBeforeExtraction ?  " (pre)" : "") + (systemInitiated ? " (sys)" : "");
         }
     }
 }


[MvxAms - Core] Config updated

[MvxAms - Core] Config updated

--- MobiliTips.MvxPlugin.MvxAms/Samples/MobiliTips.MvxPlugin.MvxAms.Sample.Core/Config.cs
+++ MobiliTips.MvxPlugin.MvxAms/Samples/MobiliTips.MvxPlugin.MvxAms.Sample.Core/Config.cs
@@ -2,7 +2,7 @@
 {
     public static class Config
     {
-        public static string AzureApplicationUrl { get { return "https://motip-ams.azure-mobile.net/"; } }
-        public static string AzureApplicationKey { get { return "klJlsQnDFHIwATrLzcnNnQpSRAQfOz43"; } }
+        public static string AzureApplicationUrl { get { return "YOURURL"; } }
+        public static string AzureApplicationKey { get { return "YOURKEY"; } }
     }
 }


Update GoogleAnalyticsPlatform.cs

Update GoogleAnalyticsPlatform.cs

--- Plugin.GoogleAnalytics/Plugin.GoogleAnalytics.WindowsStore/GoogleAnalyticsPlatform.cs
+++ Plugin.GoogleAnalytics/Plugin.GoogleAnalytics.WindowsStore/GoogleAnalyticsPlatform.cs
@@ -12,8 +12,11 @@

         private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
         {
+            if (!Current.Config.ReportUncaughtExceptions)
+                return;
+
             Current.Tracker.SendException(e.Exception, true);
             Task.Delay(1000).Wait(); //delay
         }
     }
-}+}


HKTAN version 7 ignorieren bis es implementiert wurde

--- src/libfintx/Helper/Helper.cs
+++ src/libfintx/Helper/Helper.cs
@@ -276,7 +276,10 @@
                     {
                         var TAN = Parse_String(item.Replace("HITANS:", ""), ":", "+").Replace(":", "+");

-                        client.HITANS = TAN;
+                        if (!string.IsNullOrEmpty(client.HITANS) && TAN == "7+4")
+                            ; // Ignore HKTAN version 7 if other version is available and version 7 isn't implemented in libfintx
+                        else
+                            client.HITANS = TAN;
                     }

                     if (item.Contains("HKKAZ"))


fixes for the net35 build.  still untested, but I think it looks right now.  issue #62.

--- gen_build.cs
+++ gen_build.cs
@@ -103,7 +103,7 @@
 		items_higher.Add(new config_higher { name="ugly", assemblyname="SQLitePCL.ugly", env="profile259", csfiles=new List<string>() {"src\\cs\\ugly.cs"} });
 		items_higher.Add(new config_higher { name="ugly", assemblyname="SQLitePCL.ugly", env="profile158", csfiles=new List<string>() {"src\\cs\\ugly.cs"}, defines=new List<string>() {"OLD_REFLECTION"} });
 		items_higher.Add(new config_higher { name="ugly", assemblyname="SQLitePCL.ugly", env="profile136", csfiles=new List<string>() {"src\\cs\\ugly.cs"}, defines=new List<string>() {"OLD_REFLECTION"} });
-		items_higher.Add(new config_higher { name="ugly", assemblyname="SQLitePCL.ugly", env="net35", csfiles=new List<string>() {"src\\cs\\ugly.cs"} });
+		items_higher.Add(new config_higher { name="ugly", assemblyname="SQLitePCL.ugly", env="net35", csfiles=new List<string>() {"src\\cs\\ugly.cs"}, defines=new List<string>() {"OLD_REFLECTION"} });
 	}

 	private static void init_pcl_cppinterop(bool dyn)
@@ -2437,7 +2437,10 @@
 					break;
 			}

-			f.WriteElementString("TargetFrameworkProfile", cfg.env);
+			if (cfg.is_portable())
+			{
+				f.WriteElementString("TargetFrameworkProfile", cfg.env);
+			}

 			f.WriteEndElement(); // PropertyGroup

@@ -2462,6 +2465,17 @@
 			}
 			f.WriteEndElement(); // ProjectReference
 			f.WriteEndElement(); // ItemGroup
+
+			if (cfg.is_portable())
+			{
+			}
+			else
+			{
+				f.WriteStartElement("ItemGroup");
+				write_reference(f, "System");
+				write_reference(f, "System.Core");
+				f.WriteEndElement(); // ItemGroup
+			}

 			if (cfg.is_portable())
 			{


Apply() moved after ProcessMergeChangeset()

--- GitTfs/Core/GitTfsRemote.cs
+++ GitTfs/Core/GitTfsRemote.cs
@@ -325,20 +325,23 @@
             foreach (var changeset in fetchedChangesets)
             {
                 count++;
-                var log = Apply(MaxCommitHash, changeset, objects);
                 if (lastChangesetIdToFetch > 0 && changeset.Summary.ChangesetId > lastChangesetIdToFetch)
                 {
                     fetchResult.NewChangesetCount = count;
                     fetchResult.LastFetchedChangesetId = MaxChangesetId;
                     return fetchResult;
                 }
-                if (changeset.IsMergeChangeset && !ProcessMergeChangeset(changeset, stopOnFailMergeCommit, log))
+                string parentCommitSha = null;
+                if (changeset.IsMergeChangeset && !ProcessMergeChangeset(changeset, stopOnFailMergeCommit, ref parentCommitSha))
                 {
                     fetchResult.IsSuccess = false;
                     fetchResult.NewChangesetCount = count;
                     fetchResult.LastFetchedChangesetId = MaxChangesetId;
                     return fetchResult;
                 }
+                var log = Apply(MaxCommitHash, changeset, objects);
+                if (parentCommitSha != null)
+                    log.CommitParents.Add(parentCommitSha);
                 if (changeset.Summary.ChangesetId == mergeChangesetId)
                 {
                     foreach (var parent in parentCommitsHashes)
@@ -358,13 +361,13 @@
             fetchResult.NewChangesetCount = count;
             return fetchResult;
         }
+
         private bool ProcessMergeChangeset(ITfsChangeset changeset, bool stopOnFailMergeCommit, ref string parentCommit)
         {
             if (!Tfs.CanGetBranchInformation)
             {
                 stdout.WriteLine("info: this changeset " + changeset.Summary.ChangesetId +
                                  " is a merge changeset. But was not treated as is because this version of TFS can't manage branches...");
-                return true;
             }
             else if (Repository.GetConfig(GitTfsConstants.IgnoreBranches) != true.ToString())
             {
@@ -374,40 +377,7 @@
                     shaParent = FindMergedRemoteAndFetch(parentChangesetId, stopOnFailMergeCommit);
                 if (shaParent != null)
                 {
-                    log.CommitParents.Add(shaParent);
-                }
-                else
-                {
-                    if (stopOnFailMergeCommit)
-                    {
-                        fetchResult.IsSuccess = false;
-                        fetchResult.LastFetchedChangesetId = MaxChangesetId;
-                        return fetchResult;
-                    }
-                }
-                ProcessChangeset(changeset, log);
-                DoGcIfNeeded();
-            }
-            fetchResult.NewChangesetCount = count;
-            return fetchResult;
-        }
-
-        private bool ProcessMergeChangeset(ITfsChangeset changeset, bool stopOnFailMergeCommit, LogEntry log)
-        {
-            if (!Tfs.CanGetBranchInformation)
-            {
-                stdout.WriteLine("info: this changeset " + changeset.Summary.ChangesetId +
-                                 " is a merge changeset. But was not treated as is because this version of TFS can't manage branches...");
-            }
-            else if (Repository.GetConfig(GitTfsConstants.IgnoreBranches) != true.ToString())
-            {
-                var parentChangesetId = Tfs.FindMergeChangesetParent(TfsRepositoryPath, changeset.Summary.ChangesetId, this);
-                var shaParent = Repository.FindCommitHashByChangesetId(parentChangesetId);
-                if (shaParent == null)
-                    shaParent = FindMergedRemoteAndFetch(parentChangesetId, stopOnFailMergeCommit);
-                if (shaParent != null)
-                {
-                    log.CommitParents.Add(shaParent);
+                    parentCommit = shaParent;
                 }
                 else
                 {


Table formated Groups List

Table formated Groups List

--- ITSWebMgmt/UserInfo.aspx.cs
+++ ITSWebMgmt/UserInfo.aspx.cs
@@ -111,26 +111,21 @@
         {
             StringBuilder sb = new StringBuilder();

+            var helper = new HTMLTableHelper(2);
+            sb.Append(helper.printStart());
+            sb.Append(helper.printRow(new string[]{"Domain", "Name"}, true));
+
             foreach (string adpath in groupsList)
             {
-                //DirectoryEntry de = new DirectoryEntry("LDAP://"+adpath);
-
-                //string groupname = de.Properties["cn"][0].ToString();
-                //TODO:
-                //UserPrincipal user = UserPrincipal.FindByIdentity(new PrincipalContext (ContextType.Domain, "mydomain.com"), IdentityType.SamAccountName, "username");
-                //foreach (GroupPrincipal group in user.GetGroups())
-
                 var split = adpath.Split(',');
                 var groupname = split[0].Replace("CN=", "");
-
-                sb.Append(String.Format("{1}
", HttpUtility.UrlEncode("LDAP://" + adpath), groupname));
-                //sb.Append(adpath + "
");
-                //sb.Append(groupname + "
");
-                //sb.Append("");
-
-            }
-
-
+                var domain = split.Where<string>(s=>s.StartsWith("DC=")).ToArray<string>()[0].Replace("DC=", "");
+                var name = String.Format("{1}
", HttpUtility.UrlEncode("LDAP://" + adpath), groupname);
+
+                sb.Append(helper.printRow(new string[] { domain, name }));
+            }
+
+            sb.Append(helper.printEnd());
             groupssegmentLabel.Text = sb.ToString();

         }


The RenameToUpperCaseCodeFixProvider now works for namespaces and enums

--- StyleCop.Analyzers/StyleCop.Analyzers/NamingRules/RenameToUpperCaseCodeFixProvider.cs
+++ StyleCop.Analyzers/StyleCop.Analyzers/NamingRules/RenameToUpperCaseCodeFixProvider.cs
@@ -3,12 +3,13 @@
     using System;
     using System.Collections.Immutable;
     using System.Composition;
-    using System.Linq;
+    using System.Threading;
     using System.Threading.Tasks;
     using Helpers;
     using Microsoft.CodeAnalysis;
     using Microsoft.CodeAnalysis.CodeActions;
     using Microsoft.CodeAnalysis.CodeFixes;
+    using Microsoft.CodeAnalysis.CSharp;
     using Microsoft.CodeAnalysis.CSharp.Syntax;

     /// <summary>
@@ -63,7 +64,22 @@
                 var newName = char.ToUpper(token.ValueText[0]) + token.ValueText.Substring(1);
                 var typeSyntax = this.GetParentTypeDeclaration(token);

-                if (typeSyntax != null)
+                if (token.Parent?.Parent is NamespaceDeclarationSyntax)
+                {
+                    // namespaces are not symbols. So we are just renaming the namespace
+                    Func<CancellationToken, Task<Document>> renameNamespace = t =>
+                    {
+                        IdentifierNameSyntax identifierSyntax = (IdentifierNameSyntax)token.Parent;
+
+                        var newIdentifierSyntac = identifierSyntax.WithIdentifier(SyntaxFactory.Identifier(newName));
+
+                        var newRoot = root.ReplaceNode(identifierSyntax, newIdentifierSyntac);
+                        return Task.FromResult(context.Document.WithSyntaxRoot(newRoot));
+                    };
+
+                    context.RegisterCodeFix(CodeAction.Create(string.Format(NamingResources.RenameToCodeFix, newName), renameNamespace, equivalenceKey: nameof(RenameToUpperCaseCodeFixProvider) + "_" + diagnostic.Id), diagnostic);
+                }
+                else if (typeSyntax != null)
                 {
                     SemanticModel semanticModel = await document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);

@@ -97,13 +113,13 @@
             return true;
         }

-        private TypeDeclarationSyntax GetParentTypeDeclaration(SyntaxToken token)
+        private BaseTypeDeclarationSyntax GetParentTypeDeclaration(SyntaxToken token)
         {
             SyntaxNode parent = token.Parent;

             while (parent != null)
             {
-                var declarationParent = parent as TypeDeclarationSyntax;
+                var declarationParent = parent as BaseTypeDeclarationSyntax;
                 if (declarationParent != null)
                 {
                     return declarationParent;


Updated comments on example 5.

Updated comments on example 5.

--- src/Assets/Adic/Examples/05_Commander/Scripts/Commands/RotateGameObjectCommand.cs
+++ src/Assets/Adic/Examples/05_Commander/Scripts/Commands/RotateGameObjectCommand.cs
@@ -19,6 +19,10 @@
 			//Call "Retain()" to keep the command running
 			//after the "Execute()" method is called.
 			//This way the command can receive update events.
+			//In this example the command will not be released
+			//manually. However, depending on the action being
+			//executed (e.g. some network call) you'll have to
+			//release the command manually by calling "Release()".
 			this.Retain();
 		}


Remove unnecessary debugging printout

Remove unnecessary debugging printout

--- QuickFont.Shared/GDIFont.cs
+++ QuickFont.Shared/GDIFont.cs
@@ -49,8 +49,6 @@
 		{
 			graph.DrawString(s, _font, color, x, y);

-			Debug.WriteLine(string.Format("Loading character {0}, y position is {1}", s, y));
-
 			return Point.Empty;
 		}


Added missing string terminator size

Added missing string terminator size

--- src/FreecraftCore.Serializer/Serializers/Base/BaseStringTypeSerializerStrategy.cs
+++ src/FreecraftCore.Serializer/Serializers/Base/BaseStringTypeSerializerStrategy.cs
@@ -136,9 +136,12 @@
 				offset += CharacterSize * value.Length;
 			}

-			// Write a null terminator now
+			//Write a null terminator now
 			for(int i = 0; i < CharacterSize; i++)
 				destination[offset + i] = 0;
+
+			//Add the terminator size.
+			offset += CharacterSize;
 		}
 	}
 }


Deleted unused element from layout editor.

--- src/Orchard.Web/Modules/Orchard.Layouts/Views/EditorTemplates/LayoutEditor.cshtml
+++ src/Orchard.Web/Modules/Orchard.Layouts/Views/EditorTemplates/LayoutEditor.cshtml
@@ -95,7 +95,6 @@

             <orc-layout-editor model="window.layoutEditor" ng-app="LayoutEditor" />

-        @*

*@
         @Display.DialogTemplate(Name: "Layout")


Added link to Companies House search on the Add organisation page

--- src/SFA.DAS.EmployerApprenticeshipsService.Web/Views/EmployerAgreement/Add.cshtml
+++ src/SFA.DAS.EmployerApprenticeshipsService.Web/Views/EmployerAgreement/Add.cshtml
@@ -19,6 +19,7 @@

Enter your Companies House number

+
Find my Companies House number

         <form action="@Url.Action("FindLegalEntity","EmployerAgreement")" method="POST">
             @Html.AntiForgeryToken()


Fix - Elenco mezzi in servizio

Fix - Elenco mezzi in servizio

--- src/backend/SO115App.FakePersistance.ExternalAPI/Composizione/OrdinamentoMezzi.cs
+++ src/backend/SO115App.FakePersistance.ExternalAPI/Composizione/OrdinamentoMezzi.cs
@@ -37,7 +37,7 @@

             if (IdRichiestaOrigine != null)
             {
-                var richiestaOrigine = _getRichiestaById.GetById(IdRichiestaOrigine);
+                var richiestaOrigine = _getRichiestaById.GetByCodice(IdRichiestaOrigine);
                 ValoreIntOriginePerSganciamento = GeneraValoreSganciamento(richiestaOrigine.Tipologie);
             }

@@ -50,14 +50,12 @@

         private async Task<ComposizioneMezzi> GetDistanceByGoogle(ComposizioneMezzi composizione, RichiestaAssistenza richiesta)
         {
-
             var origine = $"origins={ composizione.Mezzo.Coordinate.Latitudine.ToString().Replace(",", ".")},{ composizione.Mezzo.Coordinate.Longitudine.ToString().Replace(",", ".")}";
             var destination = $"destinations={ richiesta.Localita.Coordinate.Latitudine.ToString().Replace(",", ".")},{ richiesta.Localita.Coordinate.Longitudine.ToString().Replace(",", ".")}";
             var mode = "mode=Driving";
             var sensor = "sensor=false";

             StringContent queryString = new StringContent("");
-

             var response = await _client.PostAsync(_configuration.GetSection("UrlExternalApi").GetSection("DistanceMatrix").Value + $"&{origine}&{destination}&{mode}&{sensor}", queryString).ConfigureAwait(false);
             response.EnsureSuccessStatusCode();
@@ -68,7 +66,7 @@
             if (distanza.Rows[0].Elements[0].Distance != null)
             {
                 //LE Value sono espresse in SECONDI
-                composizione.Km = distanza.Rows[0].Elements[0].Distance.Text.ToString().Substring(0, distanza.Rows[0].Elements[0].Distance.Text.ToString().Length -2);
+                composizione.Km = distanza.Rows[0].Elements[0].Distance.Text.ToString().Substring(0, distanza.Rows[0].Elements[0].Distance.Text.ToString().Length - 2);
                 composizione.TempoPercorrenza = (distanza.Rows[0].Elements[0].Duration.Value / 60).ToString();
             }
             else


forgot to add batching journal to previous

--- src/contrib/persistence/Akka.Persistence.Sql.Common/Journal/BatchingSqlJournal.cs
+++ src/contrib/persistence/Akka.Persistence.Sql.Common/Journal/BatchingSqlJournal.cs
@@ -487,7 +487,7 @@

         /// <summary>
         /// Flag determining if incoming journal requests should be published in current actor system event stream.
-        /// Usefull mostly for tests.
+        /// Useful mostly for tests.
         /// </summary>
         protected readonly bool CanPublish;

@@ -740,11 +740,11 @@
             }
         }

-        private void NotifyPersistenceIdChanged(string persitenceId)
-        {
-            if (_persistenceIdSubscribers.TryGetValue(persitenceId, out var bucket))
-            {
-                var changed = new EventAppended(persitenceId);
+        private void NotifyPersistenceIdChanged(string persistenceId)
+        {
+            if (_persistenceIdSubscribers.TryGetValue(persistenceId, out var bucket))
+            {
+                var changed = new EventAppended(persistenceId);
                 foreach (var subscriber in bucket)
                     subscriber.Tell(changed);
             }


Removed serialization references

Removed serialization references

See #284

--- src/core/BrightstarDB/Caching/AbstractCache.cs
+++ src/core/BrightstarDB/Caching/AbstractCache.cs
@@ -1,11 +1,5 @@
 using System;
 using System.Collections.Generic;
-using System.IO;
-#if SILVERLIGHT || PORTABLE || NETCORE
-using Polenter.Serialization;
-#else
-using System.Runtime.Serialization.Formatters.Binary;
-#endif

 namespace BrightstarDB.Caching
 {
@@ -56,8 +50,8 @@
         /// <param name="cachePriority">The priority of the item in the cache</param>
         public void Insert(string key, byte[] data, CachePriority cachePriority)
         {
-            if (key == null) throw new ArgumentNullException("key");
-            if (data == null) throw new ArgumentNullException("data");
+            if (key == null) throw new ArgumentNullException(nameof(key));
+            if (data == null) throw new ArgumentNullException(nameof(data));
             Remove(key);
             if (CacheSize + data.Length > _highwaterMark)
             {
@@ -86,7 +80,7 @@
         /// <returns>The bytes for the cached item or null if the item is not found in the cache</returns>
         public byte[] Lookup(string key)
         {
-            if (key == null) throw new ArgumentNullException("key");
+            if (key == null) throw new ArgumentNullException(nameof(key));
             var cacheEntry = GetEntry(key);
             if (cacheEntry == null) return null;
             CacheEvictionPolicy.NotifyLookup(key);
@@ -100,7 +94,7 @@
         /// <param name="key">The key of the cache entry to be removed</param>
         public void Remove(string key)
         {
-            if (key == null) throw new ArgumentNullException("key");
+            if (key == null) throw new ArgumentNullException(nameof(key));
             long entrySize = RemoveEntry(key);
             lock(_cacheLock)
             {
@@ -116,7 +110,7 @@
         /// <returns>True if an entry with this key is in the cache, false otherwise</returns>
         public bool ContainsKey(string key)
         {
-            if (key == null) throw new ArgumentNullException(key);
+            if (key == null) throw new ArgumentNullException(nameof(key));
             return GetEntry(key) != null;
         }

@@ -150,7 +144,7 @@
         /// <remarks>This method calls the protected RemoveEntry method and then updates the local cache size counter</remarks>
         public long EvictEntry(string key)
         {
-            if (key == null) throw new ArgumentNullException("key");
+            if (key == null) throw new ArgumentNullException(nameof(key));
             long bytesEvicted = RemoveEntry(key);
             lock (_cacheLock)
             {
@@ -166,77 +160,5 @@
         /// <returns>The number of bytes of data evicted from the cache as a result of this operation. May be 0 if the key was not found in the cache.</returns>
         protected abstract long RemoveEntry(string key);

-        /// <summary>
-        /// Deserialize an object from a byte array
-        /// </summary>
-        /// <typeparam name="T">The type of object to deserialize</typeparam>
-        /// <param name="buff">The byte array to deserialize from</param>
-        /// <returns>The deserialized object</returns>
-        protected virtual T Deserialize<T>(byte[] buff)
-        {
-            try
-            {
-#if SILVERLIGHT || PORTABLE
-                var settings = new SharpSerializerBinarySettings(BinarySerializationMode.Burst);
-                var ms = new MemoryStream(buff);
-                var ser = new SharpSerializer(settings);
-                var deserialized = ser.Deserialize(ms);
-                return (T)deserialized;
-#else
-                if(typeof(IBinarySerializable).IsAssignableFrom(typeof(T)))
-                {
-                    var instance = Activator.CreateInstance<T>();
-                    using (var srcStream = new MemoryStream(buff))
-                    {
-                        (instance as IBinarySerializable).Read(srcStream);
-                    }
-                    return instance;
-                }
-                var ms = new MemoryStream(buff);
-                var bf = new BinaryFormatter();
-                return (T) bf.Deserialize(ms);
-#endif
-            }
-            catch (Exception ex)
-            {
-                Logging.LogError(BrightstarEventId.CacheError, "Error deserializing cached object: {0}", ex);
-                return default(T);
-            }
-        }
-
-        /// <summary>
-        /// Serialize an object to a byte array
-        /// </summary>
-        /// <param name="o">The object to be serialized</param>
-        /// <returns>The serialized form of the object</returns>
-        protected virtual byte[] Serialize(object o)
-        {
-            try
-            {
-#if SILVERLIGHT || PORTABLE
-            var settings = new SharpSerializerBinarySettings(BinarySerializationMode.Burst);
-            var ser = new SharpSerializer(settings);
-            var ms = new MemoryStream();
-            ser.Serialize(o, ms);
-            ms.Close();
-#if SILVERLIGHT
-            return ms.GetBuffer();
-#else
-            return ms.ToArray();
-#endif
-#else
-                var ms = new MemoryStream();
-                var bf = new BinaryFormatter();
-                bf.Serialize(ms, o);
-                ms.Close();
-                return ms.GetBuffer();
-#endif
-            }
-            catch (Exception ex)
-            {
-                Logging.LogError(BrightstarEventId.CacheError, "Error serializing object for cache: {0}", ex);
-                return null;
-            }
-        }
     }
 }


Add simplified Texture.GetData

Add simplified Texture.GetData

--- Raccoon/Graphics/Texture.cs
+++ Raccoon/Graphics/Texture.cs
@@ -133,6 +133,10 @@
             XNATexture.GetData(level, rect, data, startIndex, elementCount);
         }

+        public void GetData<T>(Rectangle rect, T[] data) where T : struct {
+            XNATexture.GetData(0, rect, data, 0, data?.Length ?? 0);
+        }
+
         public void SetData<T>(T[] data) where T : struct {
             XNATexture.SetData(data);
         }


Add URL for dotnet/standard auto-updates

--- build_projects/update-dependencies/Config.cs
+++ build_projects/update-dependencies/Config.cs
@@ -40,7 +40,7 @@
         private Lazy<string> _coreFxVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("COREFX_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/corefx/master/Latest_Packages.txt"));
         private Lazy<string> _coreClrVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("CORECLR_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/coreclr/master/Latest_Packages.txt"));
         private Lazy<string> _roslynVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("ROSLYN_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/roslyn/netcore1.0/Latest_Packages.txt"));
-        private Lazy<string> _standardVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("STANDARD_VERSION_URL", string.Empty));
+        private Lazy<string> _standardVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("STANDARD_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/standard/master/Latest_Packages.txt"));
         private Lazy<string> _libuvVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("LIBUV_VERSION_URL", string.Empty));
         private Lazy<string> _gitHubOriginOwner;
         private Lazy<string> _gitHubUpstreamOwner = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_UPSTREAM_OWNER", "dotnet"));


Added GetOAuthToken for script apps

Added GetOAuthToken for script apps

--- RedditSharp/AuthProvider.cs
+++ RedditSharp/AuthProvider.cs
@@ -117,6 +117,40 @@
             throw new AuthenticationException("Could not log in.");
         }

+		/// <summary>
+        /// Gets the OAuth token for the user.
+        /// </summary>
+        /// <param name="username">The username.</param>
+        /// <param name="password">The user's password.</param>
+        /// <returns>The access token</returns>
+        public string GetOAuthToken(string username, string password) {
+            if (Type.GetType("Mono.Runtime") != null)
+                ServicePointManager.ServerCertificateValidationCallback = (s, c, ch, ssl) => true;
+            _webAgent.Cookies = new CookieContainer();
+
+            var request = _webAgent.CreatePost(AccessUrl);
+
+            request.Headers["Authorization"] = "Basic " + Convert.ToBase64String(Encoding.Default.GetBytes(_clientId + ":" + _clientSecret));
+            var stream = request.GetRequestStream();
+
+            _webAgent.WritePostBody(stream, new {
+                grant_type = "password",
+                username,
+                password,
+                redirect_uri = _redirectUri
+            });
+
+            stream.Close();
+            var json = _webAgent.ExecuteRequest(request);
+            if (json["access_token"] != null) {
+                if (json["refresh_token"] != null)
+                    RefreshToken = json["refresh_token"].ToString();
+                OAuthToken = json["access_token"].ToString();
+                return json["access_token"].ToString();
+            }
+            throw new AuthenticationException("Could not log in.");
+        }
+
         /// <summary>
         /// Gets a user authenticated by OAuth2.
         /// </summary>


Remove unnecessary null check

Remove unnecessary null check

--- osu.Framework/Graphics/Containers/BufferedContainer.cs
+++ osu.Framework/Graphics/Containers/BufferedContainer.cs
@@ -109,7 +109,7 @@
             get => pixelSnapping;
             set
             {
-                if (sharedData?.MainBuffer.IsInitialized == true)
+                if (sharedData.MainBuffer.IsInitialized)
                     throw new InvalidOperationException("May only set PixelSnapping before FrameBuffers are initialized (i.e. before the first draw).");

                 pixelSnapping = value;


We can change text anchor post-load

We can change text anchor post-load

--- osu.Framework/Graphics/Containers/TextFlowContainer.cs
+++ osu.Framework/Graphics/Containers/TextFlowContainer.cs
@@ -87,6 +87,7 @@
         }

         private Anchor textAnchor = Anchor.TopLeft;
+
         /// <summary>
         /// The <see cref="Anchor"/> which text should flow from.
         /// </summary>
@@ -99,9 +100,8 @@
                     return;
                 textAnchor = value;

-                // Todo: This is temporary for now because we don't have an easy way to re-flow the container...
-                if (IsLoaded)
-                    throw new InvalidOperationException($"{nameof(TextAnchor)} may not change after the {nameof(TextFlowContainer)} is loaded.");
+                layout.Invalidate();
+                InvalidateLayout();
             }
         }


Use float.MaxValue instead of int.

Use float.MaxValue instead of int.

--- osu.Framework/Graphics/UserInterface/Tab/TabControl.cs
+++ osu.Framework/Graphics/UserInterface/Tab/TabControl.cs
@@ -145,7 +145,7 @@
             if (IsLoaded)
                 tabs.Remove(tab);

-            tab.Depth = tab.Pinned ? int.MaxValue : ++orderCounter;
+            tab.Depth = tab.Pinned ? float.MaxValue : ++orderCounter;

             // IsPresent of TabItems is based on Y position.
             // We reset it here to allow tabs to get a correct initial position.