This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Sleepy() | |
{ | |
Task.Delay(1000).Wait(); | |
//Console.WriteLine("base Sleepy"); | |
} | |
public void SleepyComplicated(Action slee) | |
{ | |
slee.Invoke(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Sleepy() | |
{ | |
Task.Delay(1000).Wait(); | |
} | |
public void SleepyComplicated(Action slee) | |
{ | |
slee(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
namespace DecompilationSpying | |
{ | |
public class AsyncSleepyMethods | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
namespace DecompilationSpying | |
{ | |
public class AsyncSleepyMethods | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task<string> CallSleepyComplicatedAwaiting() | |
{ | |
return await CallSleepyComplicatedAwaitingWithFunc(CallSleepyComplicated); | |
} | |
//////// VS | |
public async Task<string> CallSleepyComplicatedAwaiting() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param([string]$xml = 'Web.config', [string]$xdt = 'Web.Preprod.config') | |
if (!$xml -or !(Test-Path -path $xml -PathType Leaf)) { | |
throw "File not found. $xml"; | |
} | |
if (!$xdt -or !(Test-Path -path $xdt -PathType Leaf)) { | |
throw "File not found. $xdt"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd DesiredTempDirectory | |
git clone --mirror https://yourvstsaddress.visualstudio.com/defaultCollection/_git/yourProject | |
cd yourProject.git | |
git push --mirror https://yourNewAddress.visualstudio.com/defaultCollection/_git/newProjectName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void OnStateChanged() | |
{ | |
if (_application == null) | |
return; | |
if (_previousState == AndroidApplicationLifecycleState.OnCreate && _currentState == AndroidApplicationLifecycleState.OnStart) | |
_application.SendStart(); | |
else if (_previousState == AndroidApplicationLifecycleState.OnStop && _currentState == AndroidApplicationLifecycleState.OnRestart) | |
_application.SendResume(); | |
else if (_previousState == AndroidApplicationLifecycleState.OnPause && _currentState == AndroidApplicationLifecycleState.OnStop) | |
_application.SendSleep(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using LifeCycleProblem.Models; | |
using LifeCycleProblem.Views; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Xaml; | |
[assembly: XamlCompilation(XamlCompilationOptions.Compile)] | |
namespace LifeCycleProblem | |
{ | |
public partial class App : Application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using LifeCycleProblem.Models; | |
using LifeCycleProblem.ViewModels; | |
using Xamarin.Forms; | |
namespace LifeCycleProblem.Views | |
{ | |
public class BaseContentPage : ContentPage | |
{ | |
public BaseViewModel ViewModel { get; set; } |
OlderNewer