Skip to content

Instantly share code, notes, and snippets.

View vmussak's full-sized avatar

Vinicius Mussak vmussak

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Partidinha.Domain.Entities.Partida
{
public class Partida : BaseEntity
{
using MicrosoftTeamsIntegrationExample.MicrosoftTeams;
using Newtonsoft.Json;
using System;
using System.Net.Http;
using System.Text;
namespace MicrosoftTeamsIntegrationExample
{
public class MicrosoftTeamsService
{
public static void CadastrarCliente()
{
try
{
//tenta cadastrar o cliente aqui
throw new Exception("Erro ao cadastrar o cliente");
}
catch (Exception ex)
{
var teamsRequest = new MicrosoftTeamsRequest
<header>
body {
margin: 0;
background-color: #121212;
font-family: sans-serif;
}
.header {
background-color: #333;
text-align: center;
private void button1_Click(object sender, EventArgs e)
{
var valor = int.Parse(txtNumero.Text);
bool verifica = valor > 10;
MessageBox.Show("numero digitado e maior ? " + verifica);
//ou
string mensagem = valor > 10 ? "SIM" : "NÃO";
MessageBox.Show("numero digitado e maior ? " + mensagem);
@vmussak
vmussak / js-keys-objeto.js
Created February 16, 2020 14:20
Maneiras de obter as keys de um objeto com javasacript
var meuObjeto = {
b: 10,
c: 20,
d: 30
};
//Utilizando Object.keys
var x = Object.keys(meuObjeto);
for(var i = 0; i < x.length; i++) {
public class AprovarComprasDoCliente
{
public bool VerificarSeClientePodeComprar(int idCliente)
{
var cliente = _repositorio.BuscarCliente(idCliente);
//algumas verificações aqui...
//Agora verificamos o "Ativo" primeiro :)
if(cliente.Ativo || VerificaUltimaCompra(cliente))
public class AprovarComprasDoCliente
{
public bool VerificarSeClientePodeComprar(int idCliente)
{
var cliente = _repositorio.BuscarCliente(idCliente);
//algumas verificações aqui...
if(VerificaUltimaCompra(cliente) || cliente.Ativo)
{
public class Cliente
{
public int Id { get; set }
public bool Ativo { get; set; }
//Outros atributos...
}
import 'package:flutter/material.dart';
void main(){
runApp(MaterialApp(
home: Home()
));
}
class Home extends StatefulWidget {
@override