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
private async Task MethodAsync() | |
{ | |
} |
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
private string _name; | |
public string Name | |
{ | |
get => _name; | |
set => SetProperty(ref _name, value); | |
} |
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
<CodeTemplates version="3.0"> | |
<CodeTemplate version="2.0"> | |
<Header> | |
<_Group>Xml</_Group> | |
<Version /> | |
<MimeType>application/xml</MimeType> | |
<Shortcut>stl</Shortcut> | |
<_Description>StackLayout Template</_Description> | |
<TemplateType>Expansion, SurroundsWith</TemplateType> | |
</Header> |
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
var list = new List<string> { "item 1", "item 2", "item 3" }; | |
var newList = list.ToObservableCollection<string>(); |
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
//um tom de azul | |
var backgroundColor = "##50C7F3"; | |
var textColor = backgroundColor.GetContrastColor(); | |
//textColor = #000000 |
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
var str = "Água"; | |
str = str.RemoveAccents(); | |
//str = agua | |
str = "Próximo"; | |
str = str.IgnoreCaseSensitiveAndAccents(); | |
//proximo |
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(new TimerMonitor("Tag name") | |
{ | |
for (int i = 0; i < 500; i++) | |
{ | |
var x = i; | |
} | |
} | |
//Console | |
$"Tag name" time elapsed: 100ms |
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 class FileHelper | |
{ | |
public string GetLocalFilePath(string filename) | |
=> DependencyService.Get<IFileHelper>().GetLocalFilePath(filename); | |
} |
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
[assembly: Dependency(typeof(FileHelperiOS))] | |
namespace NugetMultiSample.Helpers | |
{ | |
public class FileHelperiOS : IFileHelper | |
{ | |
public string GetLocalFilePath(string filename) | |
{ | |
string docFolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal); | |
string libFolder = Path.Combine(docFolder, "..", "Library", "Databases"); | |
if (!Directory.Exists(libFolder)) |
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
[assembly: Dependency(typeof(FileHelperAndroid))] | |
namespace NugetMultiSample.Helpers | |
{ | |
public class FileHelperAndroid : IFileHelper | |
{ | |
public string GetLocalFilePath(string filename) | |
{ | |
string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal); | |
return Path.Combine(path, filename); | |
} |
NewerOlder