Skip to content

Instantly share code, notes, and snippets.

@ionixjunior
ionixjunior / YourClass.cs
Created Dec 20, 2017
Teste de construtor assíncrono
View YourClass.cs
namespace Core
{
public class YourClass
{
private Task _taskInitAsync;
public YourClass()
{
_taskInitAsync = TaskInitAsync();
}
@ionixjunior
ionixjunior / .gitlab-ci.yml
Created Oct 17, 2017
Exemplo de configuração do Gitlab CI. Ferramentas utilizadas: PHPMD, PHPCPD, PHPCS, PHPUnit e ApiDOC
View .gitlab-ci.yml
image: php:5.6
cache:
paths:
- vendor/
stages:
- qa
- test
- doc
View MainActivity.cs
...
namespace Droid
{
public class MainActivity : FormsAppCompatActivity
{
private static string _newTheme;
private static bool _canChangeTheme = false;
protected override void OnCreate(Bundle bundle)
View NavigationHelper.cs
using System;
using System.Threading.Tasks;
using Core.Interfaces;
using Core.Views;
using Xamarin.Forms;
namespace Core.Helpers
{
public class NavigationHelper : INavigationHelper
{
View App.xaml.cs
using Core.Helpers;
using Core.Interfaces;
using Core.Views;
using Xamarin.Forms;
namespace Core
{
public partial class App : Application
{
public App()
View INavigationHelper.cs
using System.Threading.Tasks;
namespace Core.Interfaces
{
public interface INavigationHelper
{
Task GotoPage2();
}
}
View Page1ViewModel.cs
using System.Threading.Tasks;
using System.Windows.Input;
using Core.Interfaces;
using Xamarin.Forms;
namespace Core.ViewModels
{
public class Page1ViewModel : BaseViewModel
{
public ICommand GotoPage2Command =>
View Page1View.xaml
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Core.Views.Page1View"
Title="Page 1"
>
<ContentPage.Content>
<StackLayout>
<Button
@ionixjunior
ionixjunior / 0_reuse_code.js
Created Jul 3, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View AssemblyInfo.cs
using System.Resources;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Xamarin.Forms.Xaml;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Core")]
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.