Cleaned up ConfigModule * Extracted all logic from Load method * Extracted Activate helper functions

--- Sonneville.Fidelity.Shell/AppStartup/NinjectModules/ConfigModule.cs
+++ Sonneville.Fidelity.Shell/AppStartup/NinjectModules/ConfigModule.cs
@@ -20,23 +20,9 @@
         public override void Load()
         {
             var workingDirectory = GetWorkingDirectory();
-
             ConfigureLog4Net(workingDirectory);
-            Bind<ILog>().ToProvider<LogProvider>();
-
-            Rebind<IDataStore>().To<JsonDataStore>().InSingletonScope();
-            var configPath = Path.Combine(
-                workingDirectory,
-                "FidelityWebDriver.Demo.json"
-            );
-            Bind<string>().ToConstant(configPath)
-                .WhenInjectedExactlyInto<JsonDataStore>();
-
-            Rebind<FidelityConfiguration>().ToMethod(context => DataStore.Get<FidelityConfiguration>());
-            Rebind<SeleniumConfiguration>().ToMethod(context => DataStore.Get<SeleniumConfiguration>());
+            ConfigureLocalDataStore(workingDirectory);
         }
-
-        private IDataStore DataStore => KernelInstance.Get<JsonDataStore>();

         private static string GetWorkingDirectory()
         {
@@ -47,11 +33,10 @@
             );
         }

-        private static void ConfigureLog4Net(string workingDirectory)
+        private void ConfigureLog4Net(string workingDirectory)
         {
-            var localDataPath = workingDirectory;
             var layout = ConfigurePatternLayout();
-            var rollingFileAppender = ConfigureRollingFileAppender(layout, localDataPath);
+            var rollingFileAppender = ConfigureRollingFileAppender(layout, workingDirectory);
             var consoleAppender = ConfigureConsoleAppender(layout);

             var hierarchy = (Hierarchy) LogManager.GetRepository();
@@ -59,6 +44,23 @@
             hierarchy.Root.AddAppender(consoleAppender);
             hierarchy.Root.Level = Level.All;
             hierarchy.Configured = true;
+
+            Bind<ILog>().ToProvider<LogProvider>();
+        }
+
+        private void ConfigureLocalDataStore(string workingDirectory)
+        {
+            Rebind<IDataStore>().To<JsonDataStore>().InSingletonScope();
+            var configPath = Path.Combine(
+                workingDirectory,
+                "FidelityWebDriver.Demo.json"
+            );
+            Bind<string>().ToConstant(configPath)
+                .WhenInjectedExactlyInto<JsonDataStore>();
+
+            var dataStore = KernelInstance.Get<IDataStore>();
+            Rebind<FidelityConfiguration>().ToMethod(context => dataStore.Get<FidelityConfiguration>());
+            Rebind<SeleniumConfiguration>().ToMethod(context => dataStore.Get<SeleniumConfiguration>());
         }

         private static T GetAssemblyAttribute<T>()
@@ -69,19 +71,17 @@
                 .Single();
         }

-        private static PatternLayout ConfigurePatternLayout()
+        private static ILayout ConfigurePatternLayout()
         {
-            var patternLayout = new PatternLayout
+            return ActivateLayout(new PatternLayout
             {
                 ConversionPattern = "%date [%thread] %-5level %logger - %message%newline"
-            };
-            patternLayout.ActivateOptions();
-            return patternLayout;
+            });
         }

-        private static RollingFileAppender ConfigureRollingFileAppender(ILayout layout, string loggingDirectory)
+        private static IAppender ConfigureRollingFileAppender(ILayout layout, string loggingDirectory)
         {
-            var appender = new RollingFileAppender
+            return ActivateAppender(new RollingFileAppender
             {
                 Name = "Default logger",
                 AppendToFile = true,
@@ -93,22 +93,30 @@
                 StaticLogFileName = true,
                 ImmediateFlush = true,
                 Threshold = Level.All,
-            };
-            appender.ActivateOptions();
-            return appender;
+            });
         }

         private static IAppender ConfigureConsoleAppender(ILayout layout)
         {
-            var appender = new ConsoleAppender
+            return ActivateAppender(new ConsoleAppender
             {
                 Name = "Console appender",
                 Layout = layout,
                 Target = Console.Error.ToString(),
                 Threshold = Level.Warn,
-            };
+            });
+        }
+
+        private static IAppender ActivateAppender(AppenderSkeleton appender)
+        {
             appender.ActivateOptions();
             return appender;
         }
+
+        private static ILayout ActivateLayout(LayoutSkeleton layout)
+        {
+            layout.ActivateOptions();
+            return layout;
+        }
     }
 }


Fixed Meter/Customer/EventType Field Typings and names to match what is expected by LSCVSReport v2.0

--- Source/Libraries/openXDA.Model/LSCVS/LSCVSRecord.cs
+++ Source/Libraries/openXDA.Model/LSCVS/LSCVSRecord.cs
@@ -43,10 +43,9 @@
         public DateTime EventStart { get; set; }
         public double Duration { get; set; }
         public double Magnitude { get; set; }
-        public int MeterID { get; set; }
-        public int CustomerID { get; set; }
-        public int EventTypeID { get; set; }
-        public bool InsideCurve { get; set; }
+        public string Meter { get; set; }
+        public string Customer { get; set; }
+        public string EventCurveCombined { get; set; }
         public double IntialMW { get; set; }
         public double FinalMW { get; set; }
         public bool Reviewed { get; set; }


don't need to pin on NETCOREAPP

don't need to pin on NETCOREAPP

--- Source/AirBreather.Common/AirBreather.Common/IO/Rfc4180CsvHelper.cs
+++ Source/AirBreather.Common/AirBreather.Common/IO/Rfc4180CsvHelper.cs
@@ -94,13 +94,19 @@
             var encoding = new UTF8Encoding(false, true);
             helper.FieldProcessed += (sender, fieldData) =>
             {
+                string fieldString;
+#if NETCOREAPP
+                fieldString = encoding.GetString(fieldData);
+#else
                 unsafe
                 {
                     fixed (byte* ptr = &MemoryMarshal.GetReference(fieldData))
                     {
-                        currentLine.Add(encoding.GetString(ptr, fieldData.Length));
+                        fieldString = encoding.GetString(ptr, fieldData.Length);
                     }
                 }
+#endif
+                currentLine.Add(fieldString);
             };

             helper.EndOfLine += (sender, args) =>


Adjust test baseline.

Adjust test baseline.

--- src/Compilers/CSharp/Test/Semantic/Semantics/UnsafeTests.cs
+++ src/Compilers/CSharp/Test/Semantic/Semantics/UnsafeTests.cs
@@ -4279,7 +4279,7 @@
         }

         [WorkItem(544346, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544346")]
-        [Fact(Skip = "PROTOTYPE(func-ptr)")]
+        [Fact]
         public void AddressOfMethodGroup()
         {
             var text = @"
@@ -4306,13 +4306,9 @@
             var typeInfo = model.GetTypeInfo(syntax);
             var type = typeInfo.Type;
             var conv = model.GetConversion(syntax);
-            Assert.NotNull(type);
+            Assert.Null(type);
             Assert.Equal(type, typeInfo.ConvertedType);
             Assert.Equal(Conversion.Identity, conv);
-
-            Assert.Equal("?*", typeInfo.Type.ToTestDisplayString());
-            Assert.Equal(TypeKind.Pointer, typeInfo.Type.TypeKind);
-            Assert.Equal(TypeKind.Error, ((IPointerTypeSymbol)typeInfo.Type).PointedAtType.TypeKind);
         }


Fix breaking change in new version of Sandcastle tools

--- Source/XsdDocumentation.BuildComponents/XsdResolveLinksComponent.cs
+++ Source/XsdDocumentation.BuildComponents/XsdResolveLinksComponent.cs
@@ -53,7 +53,7 @@
                 if (entry == null)
                 {
                     var message = string.Format(CultureInfo.CurrentCulture, Resources.CouldNotResolveXmlEntity, uri);
-                    BuildAssembler.MessageHandler(GetType(), MessageLevel.Warn, message);
+                    BuildAssembler.MessageHandler(GetType(), MessageLevel.Warn, "XSDDOC", message);
                 }
                 else
                 {


use charset 1252

use charset 1252

--- ooxml/XWPF/Usermodel/TOC.cs
+++ ooxml/XWPF/Usermodel/TOC.cs
@@ -52,7 +52,7 @@
             rPr.AddNewSzCs().val = 24;
             CT_SdtContentBlock content = block.AddNewSdtContent();
             CT_P p = content.AddNewP();
-            byte[] b = Encoding.Unicode.GetBytes("00EF7E24");
+            byte[] b = Encoding.GetEncoding(1252).GetBytes("00EF7E24");
             p.rsidR = b;
             p.rsidRDefault = b;
             p.AddNewPPr().AddNewPStyle().val=("TOCHeading");
@@ -70,7 +70,7 @@
         {
             CT_SdtContentBlock contentBlock = this.block.sdtContent;
             CT_P p = contentBlock.AddNewP();
-            byte[] b = Encoding.Unicode.GetBytes("00EF7E24");
+            byte[] b = Encoding.GetEncoding(1252).GetBytes("00EF7E24");
             p.rsidR = b;
             p.rsidRDefault = b;
             CT_PPr pPr = p.AddNewPPr();


minor

minor

--- src/biz.dfch.CS.Abiquo.Client/v1/AbiquoClient.cs
+++ src/biz.dfch.CS.Abiquo.Client/v1/AbiquoClient.cs
@@ -199,6 +199,7 @@
             var headers = new HeaderBuilder().BuildAccept(AbiquoMediaDataTypes.VND_ABIQUO_VIRTUALMACHINE).GetHeaders();

             var uriSuffix = string.Format(AbiquoUriSuffixes.VIRTUALMACHINE_BY_VIRTUALDATACENTER_ID_AND_VIRTUALAPLLIANCE_ID_AND_VIRTUALMACHINE_ID, virtualDataCenterId, virtualApplianceId, id);
+
             return Invoke<VirtualMachine>(uriSuffix, headers);
         }


update SettingTypesController

update SettingTypesController

--- src/ConfigService.Api/Controllers/SettingTypesController.cs
+++ src/ConfigService.Api/Controllers/SettingTypesController.cs
@@ -1,4 +1,4 @@
-using ConfigService.Model;
+using ConfigService.Model;
 using Microsoft.AspNetCore.Mvc;
 using Microsoft.Extensions.Logging;

@@ -31,7 +31,7 @@
         [HttpGet]
         public IActionResult Get()
         {
-            return Ok(_repository.GetListOf(c => c.Enabled == true, c => c.Id));
+            return Ok(_repository.GetListOf(c => c.Enabled, c => c.Id));
         }
     }
 }


#17-Use string interpolation in error message

--- StronglyTypedEnumConverterLib/CodeGenerators/CSharpCodeGenerator.cs
+++ StronglyTypedEnumConverterLib/CodeGenerators/CSharpCodeGenerator.cs
@@ -136,7 +136,7 @@
             code.Indent(2).AppendLine($"var result = All().FirstOrDefault(x => ({UnderlyingTypeName}) x == value);");
             code.Indent(2).AppendLine("if (result != null) return result;");
             code.AppendLine();
-            code.Indent(2).AppendLine($"throw new InvalidCastException(\"The value \" + value + \" is not a valid {TypeName}\");");
+            code.Indent(2).AppendLine($"throw new InvalidCastException($\"The value {{value}} is not a valid {TypeName}\");");
             code.Indent(1).AppendLine("}");

             return code.ToString();


Minor

Minor

* Adds explicit typing to non-generic methods
* Renaming enum

--- src/biz.dfch.CS.Activiti.Client/ProcessEngine.cs
+++ src/biz.dfch.CS.Activiti.Client/ProcessEngine.cs
@@ -38,7 +38,7 @@
             Suspend,
             Activate
         }
-        public enum EnumIndepths
+        public enum EnumIndepth
         {
             Executions,
             Tasks
@@ -78,7 +78,8 @@

             if (_IsLoggedIn) return;

-            var uri = string.Format("identity/users/{0}", HttpUtility.UrlEncode(_Client.Credential.UserName));
+            _Client.Credential = credential;
+            var uri = string.Format("identity/users/{0}", HttpUtility.UrlEncode(credential.UserName));
             var response = _Client.Invoke(uri);

             _IsLoggedIn = true;
@@ -129,7 +130,7 @@
             return result;
         }

-        public object GetWorkflowDefinitions()
+        public ProcessDefinitionsResponse GetWorkflowDefinitions()
         {
             var result = GetWorkflowDefinitions<ProcessDefinitionsResponse>();
             return result;
@@ -146,7 +147,7 @@
             return result;
         }

-        public object GetWorkflowDefinition(string definitionId)
+        public ProcessDefinitionResponseData GetWorkflowDefinition(string definitionId)
         {
             var result = GetWorkflowDefinition<ProcessDefinitionResponseData>(definitionId);
             return result;
@@ -173,7 +174,7 @@
             return result;
         }

-        public object InvokeWorkflowInstance(string definitionId, Hashtable variablesHt)
+        public ProcessInstanceResponseData InvokeWorkflowInstance(string definitionId, Hashtable variablesHt)
         {
             Contract.Requires(definitionId != null);

@@ -202,7 +203,7 @@
             return result;
         }

-        public object GetWorkflowInstances()
+        public ProcessInstancesResponse GetWorkflowInstances()
         {
             var result = GetWorkflowInstances<ProcessInstancesResponse>();
             return result;
@@ -230,30 +231,30 @@
             return result;
         }

-        public object GetWorkflowInstance(string id)
+        public ProcessInstanceResponseData GetWorkflowInstance(string id)
         {
             var result = GetWorkflowInstance<ProcessInstanceResponseData>(id);
             return result;
         }

-        public object GetWorkflowInstance(string id, bool indepth)
+        public ProcessInstanceResponseIndepthData GetWorkflowInstance(string id, bool indepth)
         {
             var result = GetWorkflowInstance<ProcessInstanceResponseIndepthData>(id);
             result.variables = GetWorkflowInstanceVariables<List<ProcessVariableData>>(id);
-            var executions = GetWorkflowIndepths<ProcessExecutionsResponse>(id, biz.dfch.CS.Activiti.Client.ProcessEngine.EnumIndepths.Executions);
+            var executions = GetWorkflowIndepth<ProcessExecutionsResponse>(id, biz.dfch.CS.Activiti.Client.ProcessEngine.EnumIndepth.Executions);
             result.executions = executions.data;
-            var tasks = GetWorkflowIndepths<ProcessTasksResponse>(id, biz.dfch.CS.Activiti.Client.ProcessEngine.EnumIndepths.Tasks);
+            var tasks = GetWorkflowIndepth<ProcessTasksResponse>(id, biz.dfch.CS.Activiti.Client.ProcessEngine.EnumIndepth.Tasks);
             result.tasks = tasks.data;
             return result;
         }
         // GetWorkflowInstance(s) end

         // GetWorkflow indepth informations...
-        public T GetWorkflowIndepths<T>(string instanceId, EnumIndepths indepths)
+        public T GetWorkflowIndepth<T>(string instanceId, EnumIndepth Indepth)
         {
             Contract.Requires(instanceId != null);

-            var uri = string.Format("query/{0}", indepths.ToString().ToLower());
+            var uri = string.Format("query/{0}", Indepth.ToString().ToLower());
             var request = new Hashtable();
             request.Add("processInstanceId", instanceId);
             var jrequest = JsonConvert.SerializeObject(request);
@@ -265,15 +266,15 @@
             return result;
         }

-        public object GetWorkflowExections(string instanceId)
-        {
-            var result = GetWorkflowIndepths<ProcessExecutionsResponse>(instanceId, biz.dfch.CS.Activiti.Client.ProcessEngine.EnumIndepths.Executions);
-            return result;
-        }
-
-        public object GetWorkflowTasks(string instanceId)
-        {
-            var result = GetWorkflowIndepths<ProcessTasksResponse>(instanceId, biz.dfch.CS.Activiti.Client.ProcessEngine.EnumIndepths.Tasks);
+        public ProcessExecutionsResponse GetWorkflowExections(string instanceId)
+        {
+            var result = GetWorkflowIndepth<ProcessExecutionsResponse>(instanceId, biz.dfch.CS.Activiti.Client.ProcessEngine.EnumIndepth.Executions);
+            return result;
+        }
+
+        public ProcessTasksResponse GetWorkflowTasks(string instanceId)
+        {
+            var result = GetWorkflowIndepth<ProcessTasksResponse>(instanceId, biz.dfch.CS.Activiti.Client.ProcessEngine.EnumIndepth.Tasks);
             return result;
         }
         // GetWorkflow indepth informations end
@@ -297,7 +298,7 @@
             return result;
         }

-        public object UpdateWorkflowInstance(string id, EnumStatus status)
+        public ProcessInstanceResponseData UpdateWorkflowInstance(string id, EnumStatus status)
         {
             var result = UpdateWorkflowInstance<ProcessInstanceResponseData>(id, status);
             result.variables = GetWorkflowInstanceVariables<List<ProcessVariableData>>(id);


Save bandwidth by passing $select=CurrentDivision in GetDivision()

--- src/ExactOnline.Client.Sdk/Controllers/ExactOnlineClient.cs
+++ src/ExactOnline.Client.Sdk/Controllers/ExactOnlineClient.cs
@@ -12,7 +12,7 @@
 	public class ExactOnlineClient
 	{
 		private readonly ApiConnector _apiConnector;
-		private readonly string _exactOnlineApiUrl;		// https://start.exactonline.nl/api/v1
+		private readonly string _exactOnlineApiUrl;     // https://start.exactonline.nl/api/v1
 		private readonly ControllerList _controllers;
 		private int _division;

@@ -54,20 +54,6 @@
 		#region Public methods

 		/// <summary>
-		/// Returns the current user data
-		/// </summary>
-		/// <returns>Me entity</returns>
-		public Me CurrentMe()
-		{
-			var conn = new ApiConnection(_apiConnector, _exactOnlineApiUrl + "current/Me");
-			string response = conn.Get("$select=*");
-			response = ApiResponseCleaner.GetJsonArray(response);
-			var converter = new EntityConverter();
-			var currentMe = converter.ConvertJsonArrayToObjectList<Me>(response);
-			return currentMe.FirstOrDefault();
-		}
-
-		/// <summary>
 		/// return the division number of the current user
 		/// </summary>
 		/// <returns>Division number</returns>
@@ -78,7 +64,12 @@
 				return _division;
 			}

-			var currentMe = CurrentMe();
+			var conn = new ApiConnection(_apiConnector, _exactOnlineApiUrl + "current/Me");
+			string response = conn.Get("$select=CurrentDivision");
+			response = ApiResponseCleaner.GetJsonArray(response);
+			var converter = new EntityConverter();
+			var currentMe = converter.ConvertJsonArrayToObjectList<Me>(response).FirstOrDefault(); ;
+
 			if (currentMe != null)
 			{
 				_division = currentMe.CurrentDivision;
@@ -99,4 +90,4 @@

 		#endregion
 	}
-}+}


PackageManager Test Tweaks #CHANGE: Extended update schedule assertions to account for situations where a previous package uninstall is superseded by a following package install, making files that were expected to be deleted actually ones that are expected to be overwritten.

--- Test/Editor/PackageManagement/PackageManagerTest.cs
+++ Test/Editor/PackageManagement/PackageManagerTest.cs
@@ -315,32 +315,43 @@
 			PackageUpdateSchedule applyScript = PackageUpdateSchedule.Load(this.workEnv.UpdateFilePath);
 			List<XElement> updateItems = applyScript.Items.ToList();

-			// Assert that every install has a matching copy for each of its files
+			// Assert that every install has a matching copy for each of its files.
+			HashSet<string> writtenFiles = new HashSet<string>();
 			foreach (MockPackageSpec package in installed)
 			{
 				foreach (var pair in package.LocalMapping)
 				{
-					this.AssertUpdateScheduleCopyItem(
+					this.AssertUpdateScheduleCopy(
 						updateItems,
 						package.Name,
 						pair.Key,
 						pair.Value);
-				}
-			}
-
-			// Assert that every uninstall has a matching copy for each of its files
+
+					// Note that an install can supersede a previous uninstall by copying a
+					// file into the same location. Keep track of all written files to check this.
+					writtenFiles.Add(pair.Value);
+				}
+			}
+
+			// Assert that every uninstall has a matching delete for each of its files.
 			foreach (MockPackageSpec package in uninstalled)
 			{
 				foreach (var pair in package.LocalMapping)
 				{
-					this.AssertUpdateScheduleDeleteItem(
+					// If the file we expect to see deleted was overwritten instead, skip
+					// the assert to account for update situations where an uninstall is
+					// immediately followed by an install.
+					if (writtenFiles.Contains(pair.Value))
+						continue;
+
+					this.AssertUpdateScheduleDelete(
 						updateItems,
 						package.Name,
 						pair.Value);
 				}
 			}
 		}
-		private void AssertUpdateScheduleCopyItem(IEnumerable<XElement> items, PackageName package, string source, string target)
+		private void AssertUpdateScheduleCopy(IEnumerable<XElement> items, PackageName package, string source, string target)
 		{
 			string sourceAbs = Path.Combine(this.workEnv.RepositoryPath, package.Id + "." + package.Version, source);
 			string targetAbs = Path.Combine(this.workEnv.RootPath, target);
@@ -372,7 +383,7 @@
 				sourceAbs,
 				targetAbs);
 		}
-		private void AssertUpdateScheduleDeleteItem(IEnumerable<XElement> items, PackageName package, string target)
+		private void AssertUpdateScheduleDelete(IEnumerable<XElement> items, PackageName package, string target)
 		{
 			string targetAbs = Path.Combine(this.workEnv.RootPath, target);


PackageManager Test Assert #ADD: Added a test assert to ensure that package update schedules don't overwrite the same file twice from different sources.

--- Test/Editor/PackageManagement/PackageManagerTest.cs
+++ Test/Editor/PackageManagement/PackageManagerTest.cs
@@ -355,7 +355,11 @@

 					// Note that an install can supersede a previous uninstall by copying a
 					// file into the same location. Keep track of all written files to check this.
-					writtenFiles.Add(pair.Value);
+					bool uniqueCopy = writtenFiles.Add(pair.Value);
+
+					// Assert that we don't copy multiple files to the same target location.
+					// The package manager should take care of resolving this up front.
+					Assert.IsTrue(uniqueCopy);
 				}
 			}


added property

added property

--- src/Feature/Reviews/code/Repositories/IReviewsRepository.cs
+++ src/Feature/Reviews/code/Repositories/IReviewsRepository.cs
@@ -2,5 +2,6 @@
 {
     public interface IReviewsRepository
     {
+        public int MyProperty { get; set; }
     }
 }


Fixes #371

Fixes #371

--- VisualStudio/ProjectPackage/OptionsPages/IntellisenseOptionsPage.cs
+++ VisualStudio/ProjectPackage/OptionsPages/IntellisenseOptionsPage.cs
@@ -77,11 +77,20 @@
         public override void LoadSettingsFromStorage()
         {
             base.LoadSettingsFromStorage();
-            SetDefaultCommitChars();
+            if (this.CommitChars != "<Empty>")
+            {
+                SetDefaultCommitChars();
+            }
+            else
+            {
+                this.CommitChars = "";
+            }
             SetCaseSync();
         }
         public override void SaveSettingsToStorage()
         {
+            if (this.CommitChars != null && this.CommitChars.Length == 0)
+                this.CommitChars = "<Empty>";
             SetDefaultCommitChars();
             base.SaveSettingsToStorage();
             SetCaseSync();


Recover from the Exception in IdleProcessor

--- src/Features/Core/Portable/SolutionCrawler/IdleProcessor.cs
+++ src/Features/Core/Portable/SolutionCrawler/IdleProcessor.cs
@@ -6,6 +6,7 @@
 using System.Threading;
 using System.Threading.Tasks;
 using System.Transactions;
+using Microsoft.CodeAnalysis.ErrorReporting;
 using Microsoft.CodeAnalysis.Shared.TestHooks;
 using Roslyn.Utilities;

@@ -143,9 +144,9 @@
                         await ExecuteAsync().ConfigureAwait(false);
                     }
                 }
-                catch (OperationCanceledException)
+                catch (Exception e) when (FatalError.ReportAndCatchUnlessCanceled(e))
                 {
-                    // ignore cancellation exception
+                    // In case any error happen during the execution, don't exit the loop and continue to work on the next item.
                 }
             }
         }


versão 3

versão 3

--- TesteDigital/TesteDigital/Views/Personagens.xaml.cs
+++ TesteDigital/TesteDigital/Views/Personagens.xaml.cs
@@ -19,20 +19,7 @@

         protected async override void OnAppearing()
         {
-            base.OnAppearing();
-
-            if (Constants.RestUrl.Contains("developer.xamarin.com"))
-            {
-                if (!alertShown)
-                {
-                    await DisplayAlert(
-                        "Hosted Back-End",
-                        "This app is running against Xamarin's read-only REST service. To create, edit, and delete data you must update the service endpoint to point to your own hosted REST service.",
-                        "OK");
-                    alertShown = true;
-                }
-            }
-
+            base.OnAppearing();
             listView.ItemsSource = await App.TesteDigitalManager.GetTasksAsync();
         }


Cosmetic changes

Cosmetic changes

--- src/Kephas.Application.Console/MessagingCommandProcessor.cs
+++ src/Kephas.Application.Console/MessagingCommandProcessor.cs
@@ -62,7 +62,7 @@
         /// </returns>
         public Task<object> ProcessAsync(string command, IExpando args = null, IContext context = null, CancellationToken cancellationToken = default)
         {
-            var message = this.CreateMessage(command, args = args ?? new Expando());
+            var message = this.CreateMessage(command, args ??= new Expando());
             return this.ProcessMessageAsync(message, args, context, cancellationToken);
         }


Fixed issue when calling console.WriteLine, before initiating the input manager.

--- Tharga.Toolkit.Console/Command/Base/InputManager.cs
+++ Tharga.Toolkit.Console/Command/Base/InputManager.cs
@@ -28,6 +28,7 @@
             _console = console;
             _console.LinesInsertedEvent += LinesInsertedEvent;
             _paramName = paramName;
+            _startLocation = new Location(_console.CursorLeft, _console.CursorTop);
         }

         private void LinesInsertedEvent(object sender, LinesInsertedEventArgs e)


Added contravariance support for value types in ContractProvider.

--- TinyReflectiveToolkit/Contracts/ContractProvider.cs
+++ TinyReflectiveToolkit/Contracts/ContractProvider.cs
@@ -291,7 +291,12 @@
                 generator.Emit(OpCodes.Ldarg_0);
                 generator.Emit(realType.IsValueType ? OpCodes.Ldflda : OpCodes.Ldfld, realInstanceField);
                 for (var i = 0; i < proxyMethodParameterTypes.Count(); i++)
+                {
                     generator.Emit(OpCodes.Ldarg, i + 1);
+                    if (proxyMethodParameterTypes[i].IsValueType &&
+                        !foundMethod.GetParameters()[i].ParameterType.IsValueType)
+                        generator.Emit(OpCodes.Box, proxyMethodParameterTypes[i]);
+                }
                 generator.EmitCall(OpCodes.Callvirt, foundMethod, null);
                 if (foundMethod.ReturnType.IsValueType && !requiredMethod.ReturnType.IsValueType)
                     generator.Emit(OpCodes.Box, foundMethod.ReturnType);


Workaround a bug in project k projects in Dev14.

--- src/PackageManagement.VisualStudio/VSNuGetProjectFactory.cs
+++ src/PackageManagement.VisualStudio/VSNuGetProjectFactory.cs
@@ -94,14 +94,17 @@
                     return null;
                 }

-                var properties = retValue.GetType().GetProperties().Where(p => p.Name == "Value");
-                if (properties.Count() != 1)
+                if (!(retValue is INuGetPackageManager))
                 {
-                    return null;
+                    // Workaround a bug in Dev14 prereleases where Lazy<INuGetPackageManager> was returned.
+                    var properties = retValue.GetType().GetProperties().Where(p => p.Name == "Value");
+                    if (properties.Count() == 1)
+                    {
+                        retValue = properties.First().GetValue(retValue);
+                    }
                 }

-                var v = properties.First().GetValue(retValue) as INuGetPackageManager;
-                return v as INuGetPackageManager;
+                return retValue as INuGetPackageManager;
             }
         }
     }


CLR structs are treated as PHP objects

CLR structs are treated as PHP objects

allows methods and properties to be called on them
ref https://github.com/peachpiecompiler/peachpie/issues/912

--- src/Peachpie.CodeAnalysis/Semantics/TypeRef/BoundTypeRef.cs
+++ src/Peachpie.CodeAnalysis/Semantics/TypeRef/BoundTypeRef.cs
@@ -804,7 +804,9 @@
                             return false;
                         }

-                        return _symbol.IsReferenceType;
+                        // all the types other than listed here
+                        // are treated as PHP objects (can call methods and properties on them)
+                        return true;

                     default:
                         return _symbol.IsReferenceType;
@@ -812,7 +814,7 @@
             }
         }

-        public override bool IsArray => IsPeachpieCorLibrary && _symbol.Name == "PhpArray";
+        public override bool IsArray => _symbol.Is_PhpArray();

         public override bool IsLambda => IsPeachpieCorLibrary && _symbol.Name == "Closure";


Fixed Documentation Typo

Fixed Documentation Typo

Fixed a small documentation typo on the routeset view,
right under the basic heading. RoutSet instead of RouteSet.

--- src/RestfulRouting.Documentation/Views/RouteSet/Show.cshtml
+++ src/RestfulRouting.Documentation/Views/RouteSet/Show.cshtml
@@ -14,7 +14,7 @@

The Basics

-
A RoutSet is a collection of route mappings. It nor only define routes in your application, but can connect to other RouteSets.

+
A RouteSet is a collection of route mappings. It nor only define routes in your application, but can connect to other RouteSets.

All routes are defined inside the Map method of a RouteSet.

 public class Routes : RouteSet


Null check for device flow interaction service (#2798)

--- src/Services/Default/DefaultDeviceFlowInteractionService.cs
+++ src/Services/Default/DefaultDeviceFlowInteractionService.cs
@@ -32,6 +32,7 @@
         public async Task<DeviceFlowAuthorizationRequest> GetAuthorizationContextAsync(string userCode)
         {
             var deviceAuth = await _devices.FindByUserCodeAsync(userCode);
+            if (deviceAuth == null) return null;

             return new DeviceFlowAuthorizationRequest
             {


Fixes U4-2980 - tabs not in the right order

--- src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs
+++ src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs
@@ -111,7 +111,7 @@

             //now we need to aggregate the tabs and properties since we might have duplicate tabs (based on aliases) because
             // of how content composition works.
-            foreach (var propertyGroups in content.PropertyGroups.GroupBy(x => x.Name))
+            foreach (var propertyGroups in content.PropertyGroups.OrderBy(x => x.SortOrder).GroupBy(x => x.Name))
             {
                 var aggregateProperties = new List<ContentPropertyDisplay>();

@@ -158,6 +158,7 @@
                     Properties = Mapper.Map<IEnumerable<Property>, IEnumerable<ContentPropertyDisplay>>(orphanProperties)
                 });

+
             //set the first tab to active
             aggregateTabs.First().IsActive = true;


Initialize AliasMatcher with a list of candidate types

--- src/AppHarbor/AliasMatcher.cs
+++ src/AppHarbor/AliasMatcher.cs
@@ -1,9 +1,17 @@
 using System;
+using System.Collections.Generic;

 namespace AppHarbor
 {
 	public class AliasMatcher : IAliasMatcher
 	{
+		private readonly IEnumerable<Type> _candidateTypes;
+
+		public AliasMatcher(IEnumerable<Type> candidateTypes)
+		{
+			_candidateTypes = candidateTypes;
+		}
+
 		public Type GetMatchedType(string commandArgument)
 		{
 			throw new NotImplementedException();


change injection replacement to only apply to relevant class in library

--- src/XlsToEf.Example/DependencyResolution/DefaultRegistry.cs
+++ src/XlsToEf.Example/DependencyResolution/DefaultRegistry.cs
@@ -45,7 +45,8 @@

             For<XlsToEfDbContext>().Use(new XlsToEfDbContext("XlsToEf"))
                 .Transient();
-            Forward<XlsToEfDbContext, DbContext>();
+            ForConcreteType<XlsxToTableImporter>()
+                .Configure.Ctor<DbContext>().Is<XlsToEfDbContext>();
         }

         #endregion


Second call to SerializeObjectToByteArray should be only if data.Length > MaximumSize

--- src/Bugsnag/Payload/Report.cs
+++ src/Bugsnag/Payload/Report.cs
@@ -102,9 +102,8 @@
         if (data.Length > MaximumSize)
         {
           Event.TrimExtraData();
+          data = Serializer.SerializeObjectToByteArray(this, _configuration.MetadataFilters);
         }
-
-        data = Serializer.SerializeObjectToByteArray(this, _configuration.MetadataFilters);
       }
       catch (System.Exception exception)
       {


Decode reference table (but has OutOfMemory bug)

--- src/CacheIO/ReferenceTable.cs
+++ src/CacheIO/ReferenceTable.cs
@@ -1,9 +1,119 @@
 using System;
+using CacheIO.IO;

 namespace CacheIO
 {
 	public class ReferenceTable
 	{
+		private Archive _archive;

+		private int _revision;
+		private bool _named;
+		private bool _usingWhirpool;
+
+		private int[] _validArchiveIds;
+		private ArchiveReference[] _archiveList;
+
+
+		public ArchiveReference[] ArchiveList
+		{
+			get { return _archiveList; }
+		}
+
+
+		public ReferenceTable(Archive archive)
+		{
+			_archive = archive;
+
+			decodeHeader();
+		}
+
+		private void decodeHeader()
+		{
+			DataInputStream stream = new DataInputStream(_archive.Data);
+			int protocol = stream.readUnsignedByte();
+
+			if (protocol < 5 || protocol > 7)
+				throw new ArgumentOutOfRangeException("INVALID PROTOCOL");
+
+			if (protocol >= 6)
+				_revision = stream.readInt();
+
+			int hash = stream.readUnsignedByte();
+			_named = (0x1 & hash) != 0;
+			_usingWhirpool = (0x2 & hash) != 0;
+
+			int validArchivesCount = (protocol >= 7 ? stream.readBigSmart() : stream.readUnsignedShort());
+			_validArchiveIds = new int[validArchivesCount];
+
+			int lastArchiveId = 0;
+			int biggestArchiveId = 0;
+			for (int index = 0; index < validArchivesCount; index++)
+			{
+				int archiveId = (lastArchiveId = lastArchiveId + (protocol >= 7 ? stream.readBigSmart() : stream.readUnsignedShort()));
+				if (archiveId > biggestArchiveId)
+					biggestArchiveId = archiveId;
+				_validArchiveIds[index] = archiveId;
+			}
+
+			_archiveList = new ArchiveReference[biggestArchiveId + 1];
+
+			for (int index = 0; index < validArchivesCount; index++)
+				_archiveList[_validArchiveIds[index]] = new ArchiveReference();
+
+			if (_named)
+			{
+				for (int index = 0; index < validArchivesCount; index++)
+					_archiveList[_validArchiveIds[index]].NameHash = (stream.readInt());
+			}
+			if (_usingWhirpool)
+			{
+				for (int index = 0; index < validArchivesCount; index++)
+				{
+					byte[] whirpool = new byte[64];
+					stream.Read(whirpool, 0, 64);
+					_archiveList[_validArchiveIds[index]].Whirpool = (whirpool);
+				}
+			}
+
+			for (int index = 0; index < validArchivesCount; index++)
+				_archiveList[_validArchiveIds[index]].CRC = (stream.readInt());
+			for (int index = 0; index < validArchivesCount; index++)
+				_archiveList[_validArchiveIds[index]].Revision = (stream.readInt());
+			for (int index = 0; index < validArchivesCount; index++)
+				_archiveList[_validArchiveIds[index]].ValidFileIds = (new int[(protocol >= 7 ? stream.readBigSmart() : stream.readUnsignedShort())]);
+
+			if (_archive.Id != 4)
+			for (int index = 0; index < validArchivesCount; index++)
+			{
+				int lastFileId = 0;
+				int biggestFileId = 0;
+				ArchiveReference archive = _archiveList[_validArchiveIds[index]];
+
+				for (int index2 = 0; index2 < archive.ValidFileIds.Length; index2++)
+				{
+					int fileId = (lastFileId = lastFileId + (protocol >= 7 ? stream.readBigSmart() : stream.readUnsignedShort()));
+					if (fileId > biggestFileId)
+						biggestFileId = fileId;
+					archive.ValidFileIds[index2] = fileId;
+				}
+
+				/*archive.FileList = (new FileReference[biggestFileId + 1]);
+
+				for (int index2 = 0; index2 < archive.ValidFileIds.Length; index2++)
+					archive.FileList[archive.ValidFileIds[index2]] = new FileReference();*/
+			}
+			/*if (_named)
+			{
+				for (int index = 0; index < validArchivesCount; index++)
+				{
+					ArchiveReference archive = _archiveList[_validArchiveIds[index]];
+					for (int index2 = 0; index2 < archive.ValidFileIds.Length; index2++)
+						archive.FileList[archive.ValidFileIds[index2]].NameHash = (stream.readInt());
+				}
+			}*/
+
+			Console.WriteLine(validArchivesCount + " Archives");
+		}
 	}
 }


minor

minor

--- src/biz.dfch.CS.Abiquo.Client.Tests/BaseAbiquoClientTest.cs
+++ src/biz.dfch.CS.Abiquo.Client.Tests/BaseAbiquoClientTest.cs
@@ -414,12 +414,15 @@
         [TestMethod]
         public void InvokeForLinksByTypeWithLinksAndLinkTypeSucceeds()
         {
+            var roleId = 42;
+            var roleName = "CLOUD_ADMIN";
+
             var type = AbiquoMediaDataTypes.VND_ABIQUO_ROLE;
-            var href = UriHelper.ConcatUri(ABIQUO_API_BASE_URI, string.Format(AbiquoUriSuffixes.ROLE_BY_ID, 42));
+            var href = UriHelper.ConcatUri(ABIQUO_API_BASE_URI, string.Format(AbiquoUriSuffixes.ROLE_BY_ID, roleId));
             var link = new LinkBuilder()
                 .BuildHref(href)
                 .BuildRel(AbiquoRelations.ROLE)
-                .BuildTitle("CLOUD_ADMIN")
+                .BuildTitle(roleName)
                 .BuildType(type)
                 .GetLink();

@@ -430,8 +433,8 @@

             var role = new Role()
             {
-                Name = "ArbitraryRole",
-                Id = 42
+                Name = roleName,
+                Id = roleId
             };

             var restCallExecutor = Mock.Create<RestCallExecutor>();
@@ -450,7 +453,7 @@
             foreach (var dictionaryParameters in result)
             {
                 Assert.IsTrue(dictionaryParameters.ContainsKey("name"));
-                Assert.AreEqual("ArbitraryRole", dictionaryParameters["name"]);
+                Assert.AreEqual(roleName, dictionaryParameters["name"]);
                 Assert.IsTrue(dictionaryParameters.ContainsKey("id"));
                 Assert.AreEqual(42L, dictionaryParameters["id"]);
             }


remove typo

remove typo

--- src/Demo.IronSharp/Program.cs
+++ src/Demo.IronSharp/Program.cs
@@ -267,7 +267,7 @@
             q.Delete(ms);
             //     or
             //q.Delete(ms.Messages.ConvertAll(m => m.Id));
-            Console.WriteLine(" >> Size of Q should be eq to zero: {0}", q.Info().Size);
+            Console.WriteLine("Size of Q should be eq to zero: {0}", q.Info().Size);
         }

         private static void TestTouching(IronMqRestClient ironMq)


Add more TablesStream props to read the tables stream header

--- src/DotNet/MD/TablesStream.cs
+++ src/DotNet/MD/TablesStream.cs
@@ -87,10 +87,60 @@
 		}

 		/// <summary>
+		/// Gets the reserved field
+		/// </summary>
+		public uint Reserved1 {
+			get { return reserved1; }
+		}
+
+		/// <summary>
+		/// Gets the version. The major version is in the upper 8 bits, and the minor version
+		/// is in the lower 8 bits.
+		/// </summary>
+		public ushort Version {
+			get { return (ushort)((majorVersion << 8) | minorVersion); }
+		}
+
+		/// <summary>
 		/// Gets <see cref="MDStreamFlags"/>
 		/// </summary>
 		public MDStreamFlags Flags {
 			get { return flags; }
+		}
+
+		/// <summary>
+		/// Gets the reserved log2 rid field
+		/// </summary>
+		public byte Log2Rid {
+			get { return log2Rid; }
+		}
+
+		/// <summary>
+		/// Gets the valid mask
+		/// </summary>
+		public ulong ValidMask {
+			get { return validMask; }
+		}
+
+		/// <summary>
+		/// Gets the sorted mask
+		/// </summary>
+		public ulong SortedMask {
+			get { return sortedMask; }
+		}
+
+		/// <summary>
+		/// Gets the extra data
+		/// </summary>
+		public uint ExtraData {
+			get { return extraData; }
+		}
+
+		/// <summary>
+		/// Gets the MD tables
+		/// </summary>
+		public MDTable[] MDTables {
+			get { return mdTables; }
 		}

 		/// <summary>


Issue #8 fixed

Issue #8 fixed

--- src/Effects/Types/Position.cs
+++ src/Effects/Types/Position.cs
@@ -1,7 +1,5 @@
 using System;
-using System.Text;
 using System.Collections.Generic;
-using SoxSharp.Exceptions;

 namespace SoxSharp.Effects.Types
@@ -31,7 +29,7 @@
     /// Initializes a new instance of the <see cref="T:SoxSharp.Effects.Types.Position"/> struct.
     /// </summary>
     /// <param name="time">Position expressed as a time value.</param>
-		Position(TimeSpan time)
+    public Position(TimeSpan time)
     {
       time_ = time;
       samples_ = null;
@@ -44,7 +42,7 @@
     /// </summary>
     /// <param name="time">Position expressed as a time value.</param>
     /// <param name="from">How</param>
-    Position(TimeSpan time, PositionFrom from)
+    public Position(TimeSpan time, PositionFrom from)
     {
       time_ = time;
       samples_ = null;
@@ -56,7 +54,7 @@
     /// Initializes a new instance of the <see cref="T:SoxSharp.Effects.Types.Position"/> struct.
     /// </summary>
     /// <param name="samples">Position expressed as number of samples.</param>
-    Position(uint samples)
+    public Position(uint samples)
     {
       time_ = null;
       samples_ = samples;
@@ -68,7 +66,7 @@
     /// </summary>
     /// <param name="samples">Position expressed as number of samples.</param>
     /// <param name="from">Whether the position is to be interpreted relative to the start, end or the previous position.</param>
-    Position(uint samples, PositionFrom from)
+    public Position(uint samples, PositionFrom from)
     {
       time_ = null;
       samples_ = samples;
@@ -90,7 +88,7 @@

     public override string ToString()
     {
-      List<string> position = new List<string>();
+      List<string> position = new List<string>(3);

       if (from_.HasValue)
       {


Added some comments to the Hoverfly.cs file.

Also added a CloseAllRunningHoverflyProcesses to the Hoverfly.cs file.

--- src/Hoverfly.Core/Hoverfly.cs
+++ src/Hoverfly.Core/Hoverfly.cs
@@ -35,6 +35,14 @@

         private Process _hoverflyProcess;

+        /// <summary>
+        /// Provide access to Hoverfly to start and stop simulation or capture HTTP calls.
+        /// </summary>
+        /// <param name="hoverflyMode">The mode hoverfly should be started in. <see cref="HoverflyMode"/></param>
+        /// <param name="config">Hoverfly configurations. <see cref="HoverflyConfig"/></param>
+        /// <param name="hoverflyClient">Hoverfly client, by default the <see cref="HoverflyClient"/> is used to accessing the Hoverfly process REST API.</param>
+        /// <param name="simulationSource">The source to the hoverfly simulations. By default the <see cref="FileSimulationSource"/> is used.</param>
+        /// <param name="loggerFactory">A logger factory for creating a logger to log messages.</param>
         public Hoverfly(
             HoverflyMode hoverflyMode,
             HoverflyConfig config = null,
@@ -55,6 +63,9 @@
             _simulationSource = simulationSource ?? new FileSimulationSource(Environment.CurrentDirectory);
         }

+        /// <summary>
+        /// Starts the hoverfly process.
+        /// </summary>
         public void Start()
         {
             if (!_hoverflyConfig.IsRemoteInstance)
@@ -64,6 +75,13 @@
             SetProxySystemProperties();
         }

+        /// <summary>
+        /// Stop the hoverfly process.
+        /// </summary>
+        /// <exception cref="TimeoutException">
+        /// Thrown when the hoverfly process is still running after trying to kill it.
+        /// Default timeout is 5 seconds.
+        /// </exception>
         public void Stop()
         {
             _logger?.Info("Destroying hoverfly process");
@@ -78,6 +96,34 @@
                 throw new TimeoutException("Timeout while waiting for hoverfly process to be closed.");
         }

+        /// <summary>
+        /// Closes all running hoverfly processes.
+        /// </summary>
+        /// <remarks>
+        /// Sometimes there are allready running hoverfly process.
+        /// By using this method all exitsing processes will be killed.
+        /// </remarks>
+        /// <exception cref="ApplicationException">
+        /// Can be thrown if there are still running hoverfly processes after trying to closing them.
+        /// </exception>
+        public void CloseAllRunningHoverflyProcesses()
+        {
+            var processesToKill = Process.GetProcessesByName("hoverfly");
+
+            foreach (var process in processesToKill)
+            {
+                process.Kill();
+                process.WaitForExit(KILL_PROCESS_TIMEOUT);
+            }
+
+            if (Process.GetProcessesByName("hoverfly").Any())
+                throw new ApplicationException("can't kill all existing running hoverfly processes.");
+        }
+
+        /// <summary>
+        /// Imports hoverfly simulation.
+        /// </summary>
+        /// <param name="name">The name of the simulation to import.</param>
         public void ImportSimulation(string name)
         {
             _logger?.Info($"Importing simulation data '{name}' to Hoverfly.");
@@ -88,6 +134,10 @@
                 _hoverflyClient.ImportSimulation(simulationData);
         }

+        /// <summary>
+        /// Export hoverfly captured or simulated simulations.
+        /// </summary>
+        /// <param name="name">The name of the exported simulation.</param>
         public void ExportSimulation(string name)
         {
             _logger?.Info("Exporting simulation data from Hoverfly.");
@@ -103,7 +153,11 @@
             }
         }

-
+        /// <summary>
+        /// Gets the hoverfly captured or imported simulations.
+        /// </summary>
+        /// <returns>Retuns a <see cref="byte[]"/> of the simulation data.</returns>
+        /// <remarks>Hoverfly simulation data is a JSON format.</remarks>
         public byte[] GetSimulation()
         {
             _logger?.Info("Get simulation data from Hoverfly.");


Fixed bug #257 - Menu Item visibility

Fixed bug #257 - Menu Item visibility

--- ElectronNET.API/Entities/MenuItem.cs
+++ ElectronNET.API/Entities/MenuItem.cs
@@ -1,6 +1,7 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Converters;
 using System;
+using System.ComponentModel;

 namespace ElectronNET.API.Entities
 {
@@ -68,12 +69,14 @@
         /// <summary>
         /// If false, the menu item will be greyed out and unclickable.
         /// </summary>
-        public bool Enabled { get; set; }
+        [DefaultValue(true)]
+        public bool Enabled { get; set; } = true;

         /// <summary>
         /// If false, the menu item will be entirely hidden.
         /// </summary>
-        public bool Visible { get; set; }
+        [DefaultValue(true)]
+        public bool Visible { get; set; } = true;

         /// <summary>
         /// Should only be specified for checkbox or radio type menu items.


Applied patch from Jordi Serrano <jordi.serrano@gmail.com>

git-svn-id: bab0c2de90ee11a20376049c2cdee62584491f34@1316 73e77b4c-caa6-f847-a29a-24ab75ae54b6

--- ActiveRecord/Castle.ActiveRecord/Attributes/BelongsToAttribute.cs
+++ ActiveRecord/Castle.ActiveRecord/Attributes/BelongsToAttribute.cs
@@ -19,8 +19,8 @@
 	public enum OuterJoinEnum
 	{
 		Auto,
-		Yes,
-		No
+		True,
+		False
 	}

 	public enum CascadeEnum


update tests

update tests

--- Algorithm.Sandbox.Tests/DataStructures/Tree/RedBlackTree_Tests.cs
+++ Algorithm.Sandbox.Tests/DataStructures/Tree/RedBlackTree_Tests.cs
@@ -64,11 +64,6 @@
             for (int i = 0; i < nodeCount; i++)
             {
                 tree.Insert(randomNumbers[i]);
-                Assert.IsTrue(tree.Count == i + 1);
-            }
-
-            for (int i = 0; i < nodeCount; i++)
-            {
                 Assert.IsTrue(tree.HasItem(randomNumbers[i]));
                 Assert.IsTrue(BinarySearchTreeTester<int>.VerifyIsBinarySearchTree(tree.Root));

@@ -78,7 +73,9 @@
                 var maxHeight = 2 * Math.Log(nodeCount + 1, 2);

                 Assert.IsTrue(actualHeight < maxHeight);
+                Assert.IsTrue(tree.Count == i + 1);
             }
+

             //shuffle again before deletion tests
             randomNumbers = Enumerable.Range(1, nodeCount)


Hide constructors of Assertion

Hide constructors of Assertion

--- EnumerableTest.Core/Sdk/Assertion.cs
+++ EnumerableTest.Core/Sdk/Assertion.cs
@@ -40,19 +40,19 @@
         /// </summary>
         public IEnumerable<KeyValuePair<string, object>> Data { get; }

-        public Assertion(bool isPassed, string messageOrNull, IEnumerable<KeyValuePair<string, object>> data)
+        internal Assertion(bool isPassed, string messageOrNull, IEnumerable<KeyValuePair<string, object>> data)
         {
             IsPassed = isPassed;
             MessageOrNull = MessageOrNull;
             Data = data;
         }

-        public Assertion(bool isPassed, IEnumerable<KeyValuePair<string, object>> data)
+        internal Assertion(bool isPassed, IEnumerable<KeyValuePair<string, object>> data)
             : this(isPassed, null, data)
         {
         }

-        public static Assertion Pass { get; } =
+        internal static Assertion Pass { get; } =
             new Assertion(true, Enumerable.Empty<KeyValuePair<string, object>>());
     }
 }


fix rotate bugs when in interactive mode

--- TwitchPlaysAssembly/Src/Commanders/BombCommander.cs
+++ TwitchPlaysAssembly/Src/Commanders/BombCommander.cs
@@ -563,15 +563,24 @@
 			float currentZSpin = Mathf.SmoothStep(oldZSpin, targetZSpin, lerp);

 			Quaternion currentRotation = Quaternion.Euler(0.0f, 0.0f, currentZSpin);
+			Vector3 HeldObjectTiltEulerAngles = _selectableManager.GetHeldObjectTiltEulerAngles();
+			HeldObjectTiltEulerAngles.x = Mathf.Clamp(HeldObjectTiltEulerAngles.x, 0 - 95f, 95f);
+			HeldObjectTiltEulerAngles.z -= _selectableManager.GetZSpin() - currentZSpin;

 			_selectableManager.SetZSpin(currentZSpin);
 			_selectableManager.SetControlsRotation(baseTransform.rotation * currentRotation);
+			_selectableManager.SetHeldObjectTiltEulerAngles(HeldObjectTiltEulerAngles);
 			_selectableManager.HandleFaceSelection();
 			yield return null;
 		}

+		Vector3 HeldObjectTileEulerAnglesFinal = _selectableManager.GetHeldObjectTiltEulerAngles();
+		HeldObjectTileEulerAnglesFinal.x = Mathf.Clamp(HeldObjectTileEulerAnglesFinal.x, 0 - 95f, 95f);
+		HeldObjectTileEulerAnglesFinal.z -= _selectableManager.GetZSpin() - targetZSpin;
+
 		_selectableManager.SetZSpin(targetZSpin);
 		_selectableManager.SetControlsRotation(baseTransform.rotation * Quaternion.Euler(0.0f, 0.0f, targetZSpin));
+		_selectableManager.SetHeldObjectTiltEulerAngles(HeldObjectTileEulerAnglesFinal);
 		_selectableManager.HandleFaceSelection();

 		_heldFrontFace = frontFace;


Handle all currently known vsnd v4

Handle all currently known vsnd v4

Fixes #182

--- ValveResourceFormat/Resource/ResourceTypes/Sound.cs
+++ ValveResourceFormat/Resource/ResourceTypes/Sound.cs
@@ -12,7 +12,6 @@
             AAC = 0,
             WAV = 1,
             MP3 = 2,
-            Unknown_This_Is_Actually_One_In_New_Format = 3,
         }

         /// <summary>
@@ -71,11 +70,7 @@
             {
                 SampleRate = reader.ReadUInt16();

-                // TODO: Is any of this actually correct?
-                var bitpackedSoundInfo = reader.ReadUInt16();
-                SoundType = GetTypeFromNewFormat(ExtractSub(bitpackedSoundInfo, 0, 2));
-                // unknown = ExtractSub(bitpackedSoundInfo, 2, 2);
-                Bits = ExtractSub(bitpackedSoundInfo, 4, 7);
+                SetVersion4();

                 SampleSize = Bits / 8;
                 Channels = 1;
@@ -97,6 +92,8 @@
                 SampleSize = ExtractSub(bitpackedSoundInfo, 9, 3);
                 AudioFormat = ExtractSub(bitpackedSoundInfo, 12, 2);
                 SampleRate = ExtractSub(bitpackedSoundInfo, 14, 17);
+
+                SoundType = (AudioFileType)3;
             }

             LoopStart = reader.ReadInt32();
@@ -104,21 +101,6 @@
             Duration = reader.ReadSingle();
             reader.BaseStream.Position += 12;
             StreamingDataSize = reader.ReadUInt32();
-        }
-
-        private static AudioFileType GetTypeFromNewFormat(uint type)
-        {
-            switch (type)
-            {
-                case 0:
-                    return AudioFileType.WAV;
-                case 1:
-                    return AudioFileType.Unknown_This_Is_Actually_One_In_New_Format;
-                case 2:
-                    return AudioFileType.MP3;
-                default:
-                    throw new InvalidDataException($"Unknown sound type: {type}");
-            }
         }

         private static uint ExtractSub(uint l, byte offset, byte nrBits)
@@ -191,6 +173,22 @@
             return stream;
         }

+        private void SetVersion4()
+        {
+            var type = Reader.ReadUInt16();
+
+            // We don't know if it's actually calculated, or if its a lookup
+            switch (type)
+            {
+                case 0x0101: SoundType = AudioFileType.WAV; Bits = 8; break;
+                case 0x0100: SoundType = AudioFileType.WAV; Bits = 16; break;
+                case 0x0200: SoundType = AudioFileType.WAV; Bits = 32; break;
+                case 0x0102: SoundType = AudioFileType.MP3; Bits = 16; break;
+                case 0x0202: SoundType = AudioFileType.MP3; Bits = 32; break;
+                default: throw new NotImplementedException($"Unhandled v4 vsnd bits: {type}");
+            }
+        }
+
         private static byte[] PackageInt(uint source, int length)
         {
             var retVal = new byte[length];


Modify layout and background of Slider

Modify layout and background of Slider

--- WPPMM/PhoneApp/CameraManager/ControlPanelManager.cs
+++ WPPMM/PhoneApp/CameraManager/ControlPanelManager.cs
@@ -5,6 +5,7 @@
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Data;
+using System.Windows.Media;
 using WPPMM.DataModel;
 using WPPMM.RemoteApi;
 using WPPMM.Utils;
@@ -99,7 +100,7 @@

             if (status.IsSupported("setExposureMode"))
             {
-                panel.Children.Add(Panels["ExposureMode"]);
+                panel.Children.Add(Panels["ExposureMode"]);
             }

             if (status.IsSupported("setExposureCompensation"))
@@ -259,8 +260,8 @@
                 {
                     HorizontalAlignment = HorizontalAlignment.Center,
                     VerticalAlignment = System.Windows.VerticalAlignment.Top,
-                    Style = Application.Current.Resources["PhoneTextNormalStyle"] as Style,
-                    Margin = new Thickness(10, 15, 0, 0),
+                    Style = Application.Current.Resources["JumpListStringStyle"] as Style,
+                    Margin = new Thickness(10, 18, 0, 0),
                     MinWidth = 25
                 };
             indicator.SetBinding(TextBlock.TextProperty, selectedbind);
@@ -348,8 +349,8 @@
             {
                 HorizontalAlignment = HorizontalAlignment.Center,
                 VerticalAlignment = System.Windows.VerticalAlignment.Top,
-                Style = Application.Current.Resources["PhoneTextNormalStyle"] as Style,
-                Margin = new Thickness(10, 15, 0, 0),
+                Style = Application.Current.Resources["JumpListStringStyle"] as Style,
+                Margin = new Thickness(10, 18, 0, 0),
                 MinWidth = 25
             };
             indicator.SetBinding(TextBlock.TextProperty, displayValueBind);
@@ -380,7 +381,7 @@
         {
             return new ToggleSwitch
             {
-                Margin = new Thickness(10, -5, 10, -10)
+                Margin = new Thickness(10, -5, 10, -40)
             };
         }

@@ -390,10 +391,11 @@
             {
                 Maximum = max,
                 Minimum = min,
-                Margin = new Thickness(5, 0, 10, 0),
+                Margin = new Thickness(5, 12, 10, -36),
                 MinWidth = 185,
                 HorizontalAlignment = HorizontalAlignment.Stretch,
-                VerticalAlignment = VerticalAlignment.Top
+                VerticalAlignment = VerticalAlignment.Top,
+                Background = Application.Current.Resources["PhoneProgressBarBackgroundBrush"] as Brush
             };
         }


Method has changed

Method has changed

--- WinAuthAndAzureAuthTestForURCS/Utils/URCSHelpers.cs
+++ WinAuthAndAzureAuthTestForURCS/Utils/URCSHelpers.cs
@@ -4,6 +4,7 @@
 using System.Net;
 using WinAuthAndAzureAuthTestForURCS.Models;
 using System.Security.Claims;
+using System.Web.Security;

 namespace WinAuthAndAzureAuthTestForURCS.Utils
 {
@@ -53,6 +54,7 @@
                     try
                     {
                         UserAccount user = db.UserAccounts.Where(u => u.Email == email).FirstOrDefault();
+                        AddCurrentUserToRoles(user);
                         HttpContext.Current.Session["username"] = user.UserName;
                         HttpContext.Current.Session["userID"] = user.UserAccountID;
                         HttpContext.Current.Session["firstName"] = user.FirstName;
@@ -83,12 +85,13 @@
             return HttpContext.Current.Session["firstName"] + " " + HttpContext.Current.Session["lastName"];
         }

-        public void SetUserIdentityForOAuth(UserAccount user)
+        public static void AddCurrentUserToRoles(UserAccount user)
         {

             foreach (UserProjectRole projRole in user.UserProjectRoles)
             {
                 //something something = projRole.Role.RoleName;
+                Roles.AddUserToRole(user.UserName, projRole.Role.RoleName);
             }
         }
     }


JimEvans: Correcting name of TearDown method for WindowTest.cs in .NET bindings.

r16304

--- dotnet/test/WebDriver.Common.Tests/WindowTest.cs
+++ dotnet/test/WebDriver.Common.Tests/WindowTest.cs
@@ -10,7 +10,7 @@
     public class WindowTest : DriverTestFixture
     {
         [TearDown]
-        public void TearDown()
+        public void RestoreBrowserWindow()
         {
             driver.Manage().Window.Restore();
         }


bugfix

bugfix

--- src/MtLogTailer/LogShipper.cs
+++ src/MtLogTailer/LogShipper.cs
@@ -50,10 +50,10 @@
 					if (Program.Terminate)
 						throw new ThreadInterruptedException();

+					buf.Clear();
 					ReadLine(reader, buf, ref pos, maxOffset);

 					Console.Write("{0}\t{1}", _filePath, buf);
-					buf.Clear();
 				}
 			}
 		}
@@ -139,7 +139,8 @@
 			}

 			stream.Position = maxOffset;
-			if (stream.ReadByte() != 0)
+			var next = stream.ReadByte();
+			if (next != 0 && next != -1)
 				throw new Exception();
 		}


Remove loosy conversion.

Remove loosy conversion.

--- src/Narvalo.Finance/Money$.cs
+++ src/Narvalo.Finance/Money$.cs
@@ -8,8 +8,6 @@
     {
         public static Money Create(decimal amount) => new Money(amount, Currency.Of("XXX"));

-        public static Money Create(double amount, Currency currency) => new Money((decimal)amount, currency);
-
         public static Money Create(long amount, Currency currency) => new Money(amount, currency);

         [CLSCompliant(false)]


Update InputSimulationEnum.cs

Update InputSimulationEnum.cs

--- Assets/MRTK/Core/Providers/InputSimulation/InputSimulationEnum.cs
+++ Assets/MRTK/Core/Providers/InputSimulation/InputSimulationEnum.cs
@@ -70,6 +70,7 @@
         MotionController,
     }

+    #region Obsolete Enum
     /// <summary>
     /// Defines for how input simulation handles controllers
     /// </summary>
@@ -97,5 +98,6 @@
         /// </summary>
         MotionController = ControllerSimulationMode.MotionController,
     }
+    #endregion

 }


removed obsolete experimental include

removed obsolete experimental include

--- Assets/MixedRealityToolkit.Tests/PlayModeTests/BaseCursorTests.cs
+++ Assets/MixedRealityToolkit.Tests/PlayModeTests/BaseCursorTests.cs
@@ -18,7 +18,6 @@
 using System.Collections;
 using System.Collections.Generic;
 using Microsoft.MixedReality.Toolkit.UI;
-using Microsoft.MixedReality.Toolkit.Experimental.UI;

 namespace Microsoft.MixedReality.Toolkit.Tests
 {


use getter cast, swap const var into raw constant

--- Assets/Shopify/UIToolkit/Shops/Generic/Classes/ProductListView.cs
+++ Assets/Shopify/UIToolkit/Shops/Generic/Classes/ProductListView.cs
@@ -45,7 +45,7 @@
                 firstLoad = false;
             }

-            contentRegion.endOffset = -elementWidth * (shop.ProductCache.Count - 5);
+            contentRegion.endOffset = -elementWidth * (shop.ProductCache.Count - potentiallyVisibleElements);

             loadingMore = false;
         }
@@ -92,8 +92,8 @@
             loadingMore = true;
         }

-        private GenericMultiProductShop shop {
-            get { return (GenericMultiProductShop)this.Shop; }
+        private new GenericMultiProductShop shop {
+            get { return Shop as GenericMultiProductShop; }
         }

         private RectTransform _scrollContentRect {


Update Settings.Designer.cs

Update Settings.Designer.cs

--- WordOfTheDay.Window/Properties/Settings.Designer.cs
+++ WordOfTheDay.Window/Properties/Settings.Designer.cs
@@ -22,5 +22,29 @@
                 return defaultInstance;
             }
         }
+
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("dictionary.dat")]
+        public string DictionaryFileName {
+            get {
+                return ((string)(this["DictionaryFileName"]));
+            }
+            set {
+                this["DictionaryFileName"] = value;
+            }
+        }
+
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string DictionaryPath {
+            get {
+                return ((string)(this["DictionaryPath"]));
+            }
+            set {
+                this["DictionaryPath"] = value;
+            }
+        }
     }
 }


kommentare hinzugefügt

kommentare hinzugefügt

--- BBT/MainWindow.xaml.cs
+++ BBT/MainWindow.xaml.cs
@@ -44,9 +44,10 @@
                     this.MindMapCanvas.Children.Remove(this._nodeRegistry[node]);
             }
             this._nodeRegistry[node] = nodeElement.Item2;
-            Point realPosition = new Point(Canvas.GetLeft(this._nodeRegistry[this._mindmap.getMainNode()]), Canvas.GetTop(this._nodeRegistry[this._mindmap.getMainNode()]));
-            Canvas.SetLeft(nodeElement.Item2, AMindMap.transformCoords(node.getRectangle().TopLeft, realPosition).X);
-            Canvas.SetTop(nodeElement.Item2, AMindMap.transformCoords(node.getRectangle().TopLeft, realPosition).Y);
+            //Point realPosition = new Point(Canvas.GetLeft(this._nodeRegistry[this._mindmap.getMainNode()]), Canvas.GetTop(this._nodeRegistry[this._mindmap.getMainNode()]));
+
+            //Canvas.SetLeft(nodeElement.Item2, AMindMap.transformCoords(node.getRectangle().TopLeft, realPosition).X);
+            //Canvas.SetTop(nodeElement.Item2, AMindMap.transformCoords(node.getRectangle().TopLeft, realPosition).Y);
             Canvas.SetZIndex(nodeElement.Item1, 0);
             Canvas.SetZIndex(nodeElement.Item2, 1);
             nodeElement.Item2.MouseLeftButtonDown += Node_MouseLeftButtonDown;
@@ -145,12 +146,20 @@
                 ToolboxRemove();
             }
         }
-
+        /// <summary>
+        /// Wenn der Wert vom slider sich ändert
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
         {
             this.FontSizeLabel.Content = "Schriftgrösse: " + System.Convert.ToInt32(this.FontSlider.Value).ToString() + "px";
         }
-
+        /// <summary>
+        /// Programm Beenden
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void Exit_Click(object sender, RoutedEventArgs e)
         {
             this.Close();
@@ -195,6 +204,11 @@

         }

+        /// <summary>
+        /// Hintergrundfarbe vom Canvas wird geändert
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void ChangeBackgroundColor_Click(object sender, RoutedEventArgs e)
         {
             ColorDialog MyDialog = new ColorDialog();


Ignore posts with no content value

Ignore posts with no content value

--- BetterWaywo/Program.cs
+++ BetterWaywo/Program.cs
@@ -130,6 +130,7 @@
                 highlights = _posts
                     .OrderByDescending(p => p.RatingsValue)
                     .Take(postCount * 2)                       // lets not read every posts' contents
+                    .Where(p => p.ContentValue > 0)
                     .OrderByDescending(p => p.RatingsValue * p.ContentMultiplier)
                     .GroupBy(p => p.Username)
                     .Select(g => g.First())


Be smarter about EnumerateAlgorithms

Be smarter about EnumerateAlgorithms

--- WinRT.NET/Security/Cryptography/Core/HashAlgorithmProvider.cs
+++ WinRT.NET/Security/Cryptography/Core/HashAlgorithmProvider.cs
@@ -70,7 +70,7 @@

 		public static IReadOnlyList<string> EnumerateAlgorithms()
 		{
-			return new ReadOnlyList<string> (Algorithms.Keys.ToList());
+			return new ReadOnlyList<string> (AlgorithmNames);
 		}

 		public static HashAlgorithmProvider OpenAlgorithm (string algorithm)
@@ -82,7 +82,7 @@
 			if (!Algorithms.TryGetValue (algorithm, out algCtor))
 				throw new COMException ("Algorithm not found", -1073741275);

-			return new HashAlgorithmProvider(algorithm, algCtor());
+			return new HashAlgorithmProvider (algorithm, algCtor());
 		}

 		private static readonly Dictionary<string, Func<HashAlgorithm>> Algorithms = new Dictionary<string, Func<HashAlgorithm>>
@@ -93,5 +93,7 @@
 			{ "SHA384", () => new SHA384CryptoServiceProvider() },
 			{ "SHA512", () => new SHA512CryptoServiceProvider() }
 		};
+
+		private static readonly string[] AlgorithmNames = Algorithms.Keys.ToArray();
 	}
 }


Adds a "pull to refresh" feature to product list.

I implemented a pull to refresh feature on the initial product list.
There is a lot of UI code to make it smooth, but I believe the results
pay off.

If products are added on the server after the app has launched, the new
products would be downloaded after the user pulls the table view down
past a certain threshold and releases it.

This is an iOS project-only change.

--- XamarinStore.iOS/ViewControllers/ProductListViewController.cs
+++ XamarinStore.iOS/ViewControllers/ProductListViewController.cs
@@ -5,11 +5,17 @@

 using MonoTouch.UIKit;
 using MonoTouch.Foundation;
+using System.Threading.Tasks;

 namespace XamarinStore.iOS
 {
 	public class ProductListViewController : UITableViewController
 	{
+		bool PulledDown;
+		bool Refreshing;
+		const float PullToRefreshThreshold = -140;
+		PullToRefreshStretchyView pullToRefreshStretchyView;
+
 		const int ProductCellRowHeight = 300;
 		static float ImageWidth = UIScreen.MainScreen.Bounds.Width * UIScreen.MainScreen.Scale;

@@ -18,6 +24,7 @@
 		ProductListViewSource source;

 		public ProductListViewController ()
+			:base()
 		{
 			Title = "Xamarin Store";

@@ -25,11 +32,79 @@
 			NavigationItem.BackBarButtonItem = new UIBarButtonItem ("", UIBarButtonItemStyle.Plain, handler: null);
 			TableView.SeparatorStyle = UITableViewCellSeparatorStyle.None;
 			TableView.RowHeight = ProductCellRowHeight;
-			TableView.Source = source = new ProductListViewSource (products => {
-				ProductTapped (products);
+			TableView.AllowsSelection = false;
+			TableView.Source = source = new ProductListViewSource (product => {
+				ProductTapped (product);
 			});

+			pullToRefreshStretchyView = new PullToRefreshStretchyView (new RectangleF ());
+			View.AddSubview (pullToRefreshStretchyView);
+			TableView.Scrolled += HandleTableViewScrolled;
+			TableView.DraggingEnded += HandleTableViewReleased;
+
 			GetData ();
+		}
+
+		void StartRefreshing ()
+		{
+			Refreshing = true;
+			pullToRefreshStretchyView.SetRefreshing ();
+			UIView.Animate (0.25, 0, UIViewAnimationOptions.CurveEaseInOut,
+				delegate {
+					TableView.ContentInset = new UIEdgeInsets (-PullToRefreshThreshold, 0, 0, 0);
+				}, delegate {
+					TableView.ContentInset = new UIEdgeInsets (-PullToRefreshThreshold, 0, 0, 0);
+
+					Task.Factory.StartNew(delegate {
+						InvokeOnMainThread(delegate {
+							GetData();
+						});
+					}).ContinueWith(delegate {
+						InvokeOnMainThread(delegate {
+							StopRefreshing();
+						});
+					});
+				}
+			);
+		}
+
+		void StopRefreshing ()
+		{
+			pullToRefreshStretchyView.SetNotRefreshing ();
+			UIView.Animate (0.25, 0, UIViewAnimationOptions.CurveEaseInOut,
+				delegate {
+					TableView.ContentInset = new UIEdgeInsets (64, 0, 0, 0);
+					pullToRefreshStretchyView.Frame = new RectangleF (0, View.Frame.Y, View.Bounds.Width, 0);
+				}, delegate {
+					TableView.ContentInset = new UIEdgeInsets (64, 0, 0, 0);
+					pullToRefreshStretchyView.Frame = new RectangleF (0, View.Frame.Y, View.Bounds.Width, 0);
+					pullToRefreshStretchyView.Label.Alpha=1;
+					Refreshing = false;
+				}
+			);
+		}
+
+		void HandleTableViewReleased (object sender, DraggingEventArgs e)
+		{
+			if (PulledDown && !Refreshing) {
+				StartRefreshing ();
+			}
+		}
+
+		void HandleTableViewScrolled (object sender, EventArgs e)
+		{
+			if (source.Products != null) {
+				float Offset = TableView.ContentOffset.Y;
+				if (Offset >= -64)
+					return;
+
+				PulledDown = Offset <= PullToRefreshThreshold;
+				if (PulledDown)
+					pullToRefreshStretchyView.SetPastThreshold ();
+				else
+					pullToRefreshStretchyView.SetBeforeThreshold ();
+				pullToRefreshStretchyView.Frame = new RectangleF (0, Offset + 64, View.Bounds.Width, -(Offset + 64));
+			}
 		}

 		async void GetData ()
@@ -63,13 +138,6 @@
 				return Products == null ? 1 : Products.Count;
 			}

-			public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
-			{
-				if (Products == null)
-					return;
-				ProductSelected (Products [indexPath.Row]);
-			}
-
 			public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
 			{
 				if (Products == null) {
@@ -77,8 +145,16 @@
 				}

 				var cell = tableView.DequeueReusableCell (ProductListCell.CellId) as ProductListCell ?? new ProductListCell ();
+				cell.ProductTapped -= HandleProductTapped;
+				cell.ProductTapped += HandleProductTapped;
 				cell.Product = Products [indexPath.Row];
 				return cell;
+			}
+
+			void HandleProductTapped (object sender, Product e)
+			{
+				if (ProductSelected != null)
+					ProductSelected (e);
 			}
 		}

@@ -89,6 +165,9 @@
 			Product product;
 			TopAlignedImageView imageView;
 			UILabel nameLabel, priceLabel;
+			UITapGestureRecognizer tapGestureRecognizer;
+
+			public event EventHandler<Product> ProductTapped;

 			public Product Product {
 				get { return product; }
@@ -115,6 +194,11 @@
 				imageView = new TopAlignedImageView {
 					ClipsToBounds = true,
 				};
+				tapGestureRecognizer = new UITapGestureRecognizer(delegate(UITapGestureRecognizer obj) {
+					if(obj.State == UIGestureRecognizerState.Ended && ProductTapped!=null)
+						ProductTapped(this,this.product);
+				});
+				imageView.AddGestureRecognizer(tapGestureRecognizer);

 				nameLabel = new UILabel {
 					TextColor = UIColor.White,
@@ -127,7 +211,8 @@
 						ShadowColor = UIColor.Black.CGColor,
 						ShadowOffset = new System.Drawing.SizeF(0,1f),
 						ShadowOpacity = .5f,
-					}
+					},
+					UserInteractionEnabled=false
 				};

 				priceLabel = new UILabel {
@@ -138,6 +223,7 @@
 					Font = UIFont.FromName ("HelveticaNeue", 16),
 					ShadowColor = UIColor.LightGray,
 					ShadowOffset = new SizeF(.5f, .5f),
+					UserInteractionEnabled=false
 				};

 				var layer = priceLabel.Layer;
@@ -168,5 +254,67 @@
 				);
 			}
 		}
+
+		class PullToRefreshStretchyView
+			:UIView
+		{
+			public UILabel Label;
+			public UIActivityIndicatorView Spinner;
+
+			public override RectangleF Frame {
+				get {
+					return base.Frame;
+				}
+				set {
+					base.Frame = value;
+					Bounds = new RectangleF (new PointF (), value.Size);
+
+					if(Label!=null) Label.Frame = Bounds;
+					if (Spinner != null) Spinner.Frame = Bounds;
+				}
+			}
+
+			public PullToRefreshStretchyView(RectangleF frame)
+				:base(frame)
+			{
+				ClipsToBounds=true;
+				BackgroundColor = UIColor.FromRGB(230,230,230);
+
+				Label = new UILabel(new RectangleF()) {
+					Font = UIFont.FromName ("HelveticaNeue-Light", 16),
+					TextColor = UIColor.FromRGB(33,33,33),
+					Lines=1,
+					TextAlignment = UITextAlignment.Center,
+					Text = "Pull Down to Refresh"
+				};
+				AddSubview(Label);
+
+				Spinner = new UIActivityIndicatorView(UIActivityIndicatorViewStyle.Gray);
+				AddSubview(Spinner);
+
+				SetBeforeThreshold();
+			}
+
+			public void SetBeforeThreshold()
+			{
+				Label.Text = "Pull Down to Refresh";
+			}
+
+			public void SetPastThreshold()
+			{
+				Label.Text = "Release to Refresh";
+			}
+
+			public void SetRefreshing()
+			{
+				Label.Alpha = 0;
+				Spinner.StartAnimating ();
+			}
+
+			public void SetNotRefreshing()
+			{
+				Spinner.StopAnimating ();
+			}
+		}
 	}
 }


Remove null and empty string checks to allow clearing properties

--- Commands/Web/SetWeb.cs
+++ Commands/Web/SetWeb.cs
@@ -29,41 +29,49 @@

         protected override void ExecuteCmdlet()
         {
-            if (SiteLogoUrl != null)
+            var dirty = false;
+
+            foreach (var key in MyInvocation.BoundParameters.Keys)
             {
-                SelectedWeb.SiteLogoUrl = SiteLogoUrl;
-                SelectedWeb.Update();
-            }
-            if (!string.IsNullOrEmpty(AlternateCssUrl))
-            {
-                SelectedWeb.AlternateCssUrl = AlternateCssUrl;
-                SelectedWeb.Update();
-            }
-            if(!string.IsNullOrEmpty(Title))
-            {
-                SelectedWeb.Title = Title;
-                SelectedWeb.Update();
+                switch (key)
+                {
+                    case "SiteLogoUrl":
+                        SelectedWeb.SiteLogoUrl = SiteLogoUrl;
+                        dirty = true;
+                        break;
+
+                    case "AlternateCssUrl":
+                        SelectedWeb.AlternateCssUrl = AlternateCssUrl;
+                        dirty = true;
+                        break;
+
+                    case "Title":
+                        SelectedWeb.Title = Title;
+                        dirty = true;
+                        break;
+
+                    case "Description":
+                        SelectedWeb.Description = Description;
+                        dirty = true;
+                        break;
+
+                    case "MasterUrl":
+                        SelectedWeb.MasterUrl = MasterUrl;
+                        dirty = true;
+                        break;
+
+                    case "CustomMasterUrl":
+                        SelectedWeb.CustomMasterUrl = CustomMasterUrl;
+                        dirty = true;
+                        break;
+                }
             }

-            if (!string.IsNullOrEmpty(Description))
+            if (dirty)
             {
-                SelectedWeb.Description = Description;
                 SelectedWeb.Update();
+                ClientContext.ExecuteQueryRetry();
             }
-
-            if (!string.IsNullOrEmpty(MasterUrl))
-            {
-                SelectedWeb.MasterUrl = MasterUrl;
-                SelectedWeb.Update();
-            }
-
-            if (!string.IsNullOrEmpty(CustomMasterUrl))
-            {
-                SelectedWeb.CustomMasterUrl = CustomMasterUrl;
-                SelectedWeb.Update();
-            }
-
-            ClientContext.ExecuteQueryRetry();
         }
     }


Logging tweak

Logging tweak

--- src/CommitmentsV2/SFA.DAS.CommitmentsV2.MessageHandlers/EventHandlers/RecordedAct1CompletionPaymentEventHandler.cs
+++ src/CommitmentsV2/SFA.DAS.CommitmentsV2.MessageHandlers/EventHandlers/RecordedAct1CompletionPaymentEventHandler.cs
@@ -35,7 +35,7 @@
                         case ApprenticeshipStatus.Paused:
                         case ApprenticeshipStatus.Stopped:
                             apprentice.Complete(message.EventTime.UtcDateTime);
-                            _logger.LogInformation($"PaymentCompletion - Completed method called for ApprenticeshipId '{message.ApprenticeshipId}'");
+                            _logger.LogInformation($"PaymentCompletion - Completed method called for ApprenticeshipId '{message.ApprenticeshipId}' - status prior to completion was {status}");
                             break;
                         case ApprenticeshipStatus.Completed:
                             apprentice.UpdateCompletionDate(message.EventTime.UtcDateTime);


fixed typo

fixed typo

--- src/SFA.DAS.ProviderApprenticeshipsService.Application/Commands/SubmitCommitment/SubmitCommitmentCommandHandler.cs
+++ src/SFA.DAS.ProviderApprenticeshipsService.Application/Commands/SubmitCommitment/SubmitCommitmentCommandHandler.cs
@@ -38,7 +38,7 @@
             var commitment = await _commitmentsApi.GetProviderCommitment(message.ProviderId, message.CommitmentId);

             if (commitment.ProviderId != message.ProviderId)
-                throw new InvalidRequestException(new Dictionary<string, string> { { "Commitment", "This commiment does not belong to this Provider " } });
+                throw new InvalidRequestException(new Dictionary<string, string> { { "Commitment", "This commitment does not belong to this Provider" } });

             var agreementStatus = AgreementStatus.NotAgreed;
             // TODO: Refactor out these magic strings


Add another test for filed bug

Add another test for filed bug

--- src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/Maintainability/AvoidDeadConditionalCode_NullAnalysis.cs
+++ src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/Maintainability/AvoidDeadConditionalCode_NullAnalysis.cs
@@ -3333,6 +3333,29 @@
         End If
     End Sub
 End Class");
+        }
+
+        [Trait(Traits.DataflowAnalysis, Traits.Dataflow.NullAnalysis)]
+        [Trait(Traits.DataflowAnalysis, Traits.Dataflow.CopyAnalysis)]
+        [Fact, WorkItem(4411, "https://github.com/dotnet/roslyn-analyzers/issues/4411")]
+        public async Task NullCheck_AfterTryCast_03_NoDiagnostic()
+        {
+            await VerifyCSharpAnalyzerAsync(@"
+class A
+{
+    void M(object o)
+    {
+        if (o is A a)
+        {
+            _ = (a as B)?.ToString();
+        }
+    }
+}
+
+class B : A
+{
+}
+");
         }

         [Trait(Traits.DataflowAnalysis, Traits.Dataflow.NullAnalysis)]


If "no image url" is blank, image tag will not be rendered fix

--- Master/Appleseed/WebSites/Appleseed/DesktopModules/CoreModules/LeavesArticleMosaic/LeavesArticleMosaicModule.ascx.cs
+++ Master/Appleseed/WebSites/Appleseed/DesktopModules/CoreModules/LeavesArticleMosaic/LeavesArticleMosaicModule.ascx.cs
@@ -233,7 +233,7 @@
                 }
             }

-            string noImageUrl = "/desktopModules/CoreModules/LeavesArticleMosaic/No_Image_Available.jpg";
+            string noImageUrl = string.Empty; //  "/desktopModules/CoreModules/LeavesArticleMosaic/No_Image_Available.jpg";
             if (this.Settings.ContainsKey("LEAVES_ARTICLE_LISTING_NO_IMAGE_URL") && this.Settings["LEAVES_ARTICLE_LISTING_NO_IMAGE_URL"].Value != null && !string.IsNullOrEmpty(this.Settings["LEAVES_ARTICLE_LISTING_NO_IMAGE_URL"].Value.ToString()))
             {
                 noImageUrl = this.Settings["LEAVES_ARTICLE_LISTING_NO_IMAGE_URL"].Value.ToString();
@@ -267,7 +267,15 @@
                             title = title.Substring(0, titlecharLimit) + " ...";
                         }

-                        sbTabDtls.AppendLine(string.Format("

{1}

{4}

Read More

", item.url, title, columnCSSClass, item.preview_picture, desc));
+                        if (string.IsNullOrEmpty(item.preview_picture))
+                        {
+                            sbTabDtls.AppendLine(string.Format("

{1}

{3}

Read More

", item.url, title, columnCSSClass, desc));
+                        }
+                        else
+                        {
+                            sbTabDtls.AppendLine(string.Format("

{1}

{4}

Read More

", item.url, title, columnCSSClass, item.preview_picture, desc));
+                        }
+
                     }

                     ltrResults.Text = sbTabDtls.ToString();


UI Framework: Changed default value for ObjectToVisibilityConverter to Visible.

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS07]$/TimeSeriesFramework/Main;C71689

--- Source/OldCode/TimeSeriesFramework/Source/Libraries/TimeSeriesFramework/UI/Converters/ObjectToVisibilityConverter.cs
+++ Source/OldCode/TimeSeriesFramework/Source/Libraries/TimeSeriesFramework/UI/Converters/ObjectToVisibilityConverter.cs
@@ -74,7 +74,7 @@
                 }
             }

-            return Visibility.Collapsed;
+            return Visibility.Visible;
         }

         /// <summary>


Use const for values of MobilePlatform

Use const for values of MobilePlatform

Makes them usable for attributes (e.g. as a parameter for a platform specific ignore attribute)

--- appium-dotnet-driver/Appium/Enums/MobilePlatform.cs
+++ appium-dotnet-driver/Appium/Enums/MobilePlatform.cs
@@ -15,11 +15,11 @@
 {
     public sealed class MobilePlatform
     {
-        public static readonly string Android = "Android";
+        public const string Android = "Android";

-        public static readonly string IOS = "iOS";
+        public const string IOS = "iOS";

-        public static readonly string Windows = "Windows";
+        public const string Windows = "Windows";

         //FireFoxOS and WinPhone will be added when there will be the supporting of appropriate mobile OS.
     }


Update WorkingWithShapes.cs

Update WorkingWithShapes.cs

--- Examples/CSharp/Programming-Documents/Shapes/WorkingWithShapes.cs
+++ Examples/CSharp/Programming-Documents/Shapes/WorkingWithShapes.cs
@@ -21,6 +21,7 @@
             InsertShapeUsingDocumentBuilder(dataDir);
             AddCornersSnipped(dataDir);
             GetActualShapeBoundsPoints(dataDir);
+            SpecifyVerticalAnchor(dataDir);
         }

         public static void InsertShapeUsingDocumentBuilder(string dataDir)
@@ -137,5 +138,19 @@
             Console.WriteLine(shape.GetShapeRenderer().BoundsInPoints);
             // ExEnd:GetActualShapeBoundsPoints
         }
+
+        public static void SpecifyVerticalAnchor(string dataDir)
+        {
+            // ExStart:SpecifyVerticalAnchor
+            Document doc = new Document(dataDir + @"VerticalAnchor.docx");
+            NodeCollection shapes = doc.GetChildNodes(NodeType.Shape, true);
+            Shape textBoxShape = shapes[0] as Shape;
+            if (textBoxShape != null)
+            {
+                textBoxShape.TextBox.VerticalAnchor = TextBoxAnchor.Bottom;
+            }
+            doc.Save(dataDir + "VerticalAnchor_out.docx");
+            // ExEnd:SpecifyVerticalAnchor
+        }
     }
 }


Changed return when substring not required

--- ExpressionParser/Ardenian/Libraries/ExpressionParser/ExpParser.cs
+++ ExpressionParser/Ardenian/Libraries/ExpressionParser/ExpParser.cs
@@ -128,7 +128,7 @@
             {
                 ++count;
             }
-            return s.Substring(count, s.Length - count - 1);
+            return count != 0 ? s.Substring(count, s.Length - count - 1) : s;
         }
         private bool IsNegativeNumber(string[] array, int index)
         {


增加获取资源组中已准备完成资源压缩后的总大小的方法

增加获取资源组中已准备完成资源压缩后的总大小的方法

--- GameFramework/Resource/ResourceManager.ResourceGroupCollection.cs
+++ GameFramework/Resource/ResourceManager.ResourceGroupCollection.cs
@@ -79,9 +79,11 @@
                             throw new GameFrameworkException(Utility.Text.Format("Resource info '{0}' is invalid.", resourceName.FullName));
                         }

-                        m_ResourceNames.Add(resourceName);
-                        m_TotalLength += resourceInfo.Length;
-                        m_TotalCompressedLength += resourceInfo.CompressedLength;
+                        if (m_ResourceNames.Add(resourceName))
+                        {
+                            m_TotalLength += resourceInfo.Length;
+                            m_TotalCompressedLength += resourceInfo.CompressedLength;
+                        }
                     }
                 }
             }


Null pointer Error fix

Null pointer Error fix

--- IntelliCloud/IntelliCloud.Business/Manager/IntelliCloudManager.cs
+++ IntelliCloud/IntelliCloud.Business/Manager/IntelliCloudManager.cs
@@ -30,13 +30,15 @@
                 questionEntity.QuestionState = QuestionState.Open;

                 // Check if the user already exists
-                var userEntity = (from u in ctx.Users
-                            where u.Id == ctx.Sources.Single(s => s.SourceDefinition.Id == questionEntity.SourceType.Id && s.Value == reference).UserId
-                            select u).SingleOrDefault();
-
-                if (userEntity != null)
+                var sourceEntity = ctx.Sources.SingleOrDefault(s => s.SourceDefinition.Id == questionEntity.SourceType.Id && s.Value == reference);
+
+                if (sourceEntity != null)
                 {
                     // user already has an account, use this
+                    var userEntity = (from u in ctx.Users
+                            where u.Id == sourceEntity.UserId
+                            select u).Single();
+
                     questionEntity.User = userEntity;
                 }
                 else
@@ -54,13 +56,13 @@
                     questionEntity.User = newUserEntity;

                     // Mount the source to the new user
-                    SourceEntity sourceEntity = new SourceEntity();
-                    sourceEntity.Value = reference;
-                    sourceEntity.CreationTime = DateTime.UtcNow;
-                    sourceEntity.SourceDefinition = questionEntity.SourceType;
-                    sourceEntity.UserId = newUserEntity.Id;
-
-                    ctx.Sources.Add(sourceEntity);
+                    SourceEntity newSourceEntity = new SourceEntity();
+                    newSourceEntity.Value = reference;
+                    newSourceEntity.CreationTime = DateTime.UtcNow;
+                    newSourceEntity.SourceDefinition = questionEntity.SourceType;
+                    newSourceEntity.UserId = newUserEntity.Id;
+
+                    ctx.Sources.Add(newSourceEntity);

                 }


add sync methods for scene

add sync methods for scene

--- dotnet-clara/lib/resources/Scenes.cs
+++ dotnet-clara/lib/resources/Scenes.cs
@@ -59,7 +59,7 @@
         }

         //Render an image
-        public async Task<Stream> Render(string sceneId, string query, string options)
+        public async Task<Stream> RenderAsync(string sceneId, string query, string options)
         {
             RenderQuery renderQuery = JsonConvert.DeserializeObject<RenderQuery>(query);
             CommandOptions option = JsonConvert.DeserializeObject<CommandOptions>(options);
@@ -83,8 +83,30 @@

             return await resp.Content.ReadAsStreamAsync();
         }
+        public Stream Render(string sceneId, string query, string options)
+        {
+            RenderQuery renderQuery = JsonConvert.DeserializeObject<RenderQuery>(query);
+            CommandOptions option = JsonConvert.DeserializeObject<CommandOptions>(options);
+
+            string requestUrl = sceneId + "/render";
+            if (option.command == null)
+                renderQuery.setupCommand = "";
+            else
+                renderQuery.setupCommand = option.command;
+
+            renderQuery.data = option.data;
+
+            var jsonSerializer = new Method.NewtonsoftJsonSerializer();
+            string json = jsonSerializer.Serialize(renderQuery);
+
+            StringContent content = new StringContent(json, Encoding.UTF8, "application/json");
+
+            HttpResponseMessage resp = method.Request("post", requestUrl, content, true);
+
+            return resp.Content.ReadAsStreamAsync().Result;
+        }
         //Return the thumbnail of the scene
-        public async Task<Stream> Thumbnail(string sceneId)
+        public async Task<Stream> ThumbnailAsync(string sceneId)
         {
             string requestUrl = sceneId + "/thumbnail.jpg";

@@ -94,9 +116,17 @@

             return await resp.Content.ReadAsStreamAsync();
         }
+        public Stream Thumbnail(string sceneId)
+        {
+            string requestUrl = sceneId + "/thumbnail.jpg";
+
+            HttpResponseMessage resp = method.Request("get", requestUrl, null, true);
+
+            return resp.Content.ReadAsStreamAsync().Result;
+        }

         //Run a command
-        public async Task<HttpResponseMessage> Command(string sceneId, string commandOptions)
+        public async Task<HttpResponseMessage> CommandAsync(string sceneId, string commandOptions)
         {
             CommandOptions option = JsonConvert.DeserializeObject<CommandOptions>(commandOptions);
             string requestUrl = sceneId + "/command/" + option.command;
@@ -115,9 +145,28 @@

             return await response;
         }
+        public HttpResponseMessage Command(string sceneId, string commandOptions)
+        {
+            CommandOptions option = JsonConvert.DeserializeObject<CommandOptions>(commandOptions);
+            string requestUrl = sceneId + "/command/" + option.command;
+
+            var data = new { data = option.data };
+
+            var jsonSerializer = new Method.NewtonsoftJsonSerializer();
+            string json;
+            if (option.data == null)
+                json = "{}";
+            else
+                json = jsonSerializer.Serialize(data);
+
+            StringContent content = new StringContent(json, Encoding.UTF8, "application/json");
+            HttpResponseMessage response = method.Request("post", requestUrl, content);
+
+            return response;
+        }

         //Import files
-        public async Task<HttpResponseMessage> Import(string sceneId, string[] fileList)
+        public async Task<HttpResponseMessage> ImportAsync(string sceneId, string[] fileList)
         {
             string requestUrl = sceneId + "/import";

@@ -137,9 +186,29 @@

             return await response;
         }
+        public HttpResponseMessage Import(string sceneId, string[] fileList)
+        {
+            string requestUrl = sceneId + "/import";
+
+            var content = new MultipartFormDataContent();
+
+            foreach (string file in fileList)
+            {
+                var fileContent = new ByteArrayContent(System.IO.File.ReadAllBytes(file));
+
+                fileContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment")
+                {
+                    FileName = file
+                };
+                content.Add(fileContent);
+            }
+            HttpResponseMessage response = method.Request("post", requestUrl, content);
+
+            return response;
+        }

         //Export a scene
-        public async Task<Stream> Export(string sceneId, string extension)
+        public async Task<Stream> ExportAsync(string sceneId, string extension)
         {
             string requestUrl = sceneId + "/export/" + extension;
             Task<HttpResponseMessage> getResponse = method.RequestAsync("post", requestUrl, null, true); ;
@@ -147,34 +216,60 @@

             return await resp.Content.ReadAsStreamAsync();
         }
+        public Stream Export(string sceneId, string extension)
+        {
+            string requestUrl = sceneId + "/export/" + extension;
+            HttpResponseMessage resp = method.Request("post", requestUrl, null, true); ;
+
+            return resp.Content.ReadAsStreamAsync().Result;
+        }

         //Clone a scene
-        public async Task<HttpResponseMessage> Clone(string sceneId)
+        public async Task<HttpResponseMessage> CloneAsync(string sceneId)
         {
             string requestUrl = sceneId + "/clone";
             Task<HttpResponseMessage> response = method.RequestAsync("post", requestUrl, null);
             return await response;
         }
+        public HttpResponseMessage Clone(string sceneId)
+        {
+            string requestUrl = sceneId + "/clone";
+            HttpResponseMessage response = method.Request("post", requestUrl, null);
+            return response;
+        }

         //Delete a scene
-        public async Task<HttpResponseMessage> Delete(string sceneId)
+        public async Task<HttpResponseMessage> DeleteAsync(string sceneId)
         {
             string requestUrl = sceneId;
             Task<HttpResponseMessage> response = method.RequestAsync("delete", requestUrl, null);
             return await response;
         }
+        public HttpResponseMessage Delete(string sceneId)
+        {
+            string requestUrl = sceneId;
+            HttpResponseMessage response = method.Request("delete", requestUrl, null);
+            return response;
+        }

         //Create a scene
-        public async Task<HttpResponseMessage> Create()
+        public async Task<HttpResponseMessage> CreateAsync()
         {
             string requestUrl = null;

             Task<HttpResponseMessage> response = method.RequestAsync("post", requestUrl, null);
             return await response;
         }
+        public HttpResponseMessage Create()
+        {
+            string requestUrl = null;
+
+            HttpResponseMessage response = method.Request("post", requestUrl, null);
+            return response;
+        }

         //Update a scene
-        public async Task<HttpResponseMessage> Update(string sceneId, string sceneName)
+        public async Task<HttpResponseMessage> UpdateAsync(string sceneId, string sceneName)
         {
             string requestUrl = sceneId;

@@ -185,18 +280,35 @@
             Task<HttpResponseMessage> response = method.RequestAsync("put", requestUrl, content);
             return await response;
         }
-
+        public HttpResponseMessage Update(string sceneId, string sceneName)
+        {
+            string requestUrl = sceneId;
+
+            string json = "{\"name\":\"" + sceneName + "\"}";
+
+            StringContent content = new StringContent(json, Encoding.UTF8, "application/json");
+
+            HttpResponseMessage response = method.Request("put", requestUrl, content);
+            return response;
+        }
         //Create a scene
-        public async Task<HttpResponseMessage> Get(string sceneId)
+        public async Task<HttpResponseMessage> GetAsync(string sceneId)
         {
             string requestUrl = sceneId;

             Task<HttpResponseMessage> response = method.RequestAsync("get", requestUrl, null);
             return await response;
         }
+        public HttpResponseMessage Get(string sceneId)
+        {
+            string requestUrl = sceneId;
+
+            HttpResponseMessage response = method.Request("get", requestUrl, null);
+            return response;
+        }

         //List public scenes
-        public async Task<HttpResponseMessage> Library(string query)
+        public async Task<HttpResponseMessage> LibraryAsync(string query)
         {
             string requestUrl = null;

@@ -207,6 +319,18 @@

             Task<HttpResponseMessage> response = method.RequestAsync("get", requestUrl, content);
             return await response;
+        }
+        public HttpResponseMessage Library(string query)
+        {
+            string requestUrl = null;
+
+            Query queryObj = JsonConvert.DeserializeObject<Query>(query);
+            var jsonSerializer = new Method.NewtonsoftJsonSerializer();
+            string json = jsonSerializer.Serialize(queryObj);
+            StringContent content = new StringContent(json, Encoding.UTF8, "application/json");
+
+            HttpResponseMessage response = method.Request("get", requestUrl, content);
+            return response;
         }

     }


Add missing @ (#184)

Add missing @ (#184)

Addresses #183

--- src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Areas/Identity/Views/Account/AccessDenied.cshtml
+++ src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Areas/Identity/Views/Account/AccessDenied.cshtml
@@ -3,6 +3,6 @@
 }

-
ViewData["Title"]

+
@ViewData["Title"]

You do not have access to this resource.


C# Masterclass Exam - 16 May 2021

C# Masterclass Exam - 16 May 2021


Remove static DestructorStandardText

Remove static DestructorStandardText

--- StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1643DestructorSummaryDocumentationMustBeginWithStandardText.cs
+++ StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1643DestructorSummaryDocumentationMustBeginWithStandardText.cs
@@ -68,18 +68,6 @@

         private static readonly Action<SyntaxNodeAnalysisContext> DestructorDeclarationAction = HandleDestructor;

-        /// <summary>
-        /// Gets the standard text which is expected to appear at the beginning of the <c><summary></c>
-        /// documentation for a destructor.
-        /// </summary>
-        /// <value>
-        /// A two-element array containing the standard text which is expected to appear at the beginning of the
-        /// <c><summary></c> documentation for a destructor. The first element appears before the name of the
-        /// containing class, followed by a <c><see></c> element targeting the containing type, and finally
-        /// followed by the second element of this array.
-        /// </value>
-        public static ImmutableArray<string> DestructorStandardText { get; } = ImmutableArray.Create("Finalizes an instance of the ", " class.");
-
         /// <inheritdoc/>
         public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
             ImmutableArray.Create(Descriptor);


Remove unused using.

Remove unused using.

--- src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/InteropServices/CSharpDynamicInterfaceCastableImplementation.Fixer.cs
+++ src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/InteropServices/CSharpDynamicInterfaceCastableImplementation.Fixer.cs
@@ -1,6 +1,5 @@
 // Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

-using System;
 using System.Collections.Generic;
 using System.Composition;
 using System.Linq;