Skip to content

Instantly share code, notes, and snippets.

Avatar
🛹
sk8 & cr8

Geoffrey McGill geoffreymcgill

🛹
sk8 & cr8
View GitHub Profile
@geoffreymcgill
geoffreymcgill / .gitignore
Created Jan 16, 2019
Visual Studio .gitignore
View .gitignore
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
View 1. HelloWorld.cs
public class Program
{
public static void Main()
{
var msg = "Hello, World!";
Console.WriteLine(msg);
// Try other C# samples from the
// "Samples" button in the top right
@geoffreymcgill
geoffreymcgill / BRIDGE-SLA
Created Dec 20, 2017
BRIDGE.NET SOFTWARE LICENSE AGREEMENT
View BRIDGE-SLA
THIS DOCUMENT IS A LEGAL AGREEMENT (the "License Agreement") BETWEEN OBJECT.NET, INC. ("We," "Us") AND
YOU OR THE ORGANIZATION ON WHOSE BEHALF YOU ARE UNDERTAKING THE LICENSE DESCRIBED BELOW ("You",
"Your") IN RELATION TO THE BRIDGE.NET SOFTWARE LIBRARY(IES) (THE "Software"), IN BOTH SOURCE AND
OBJECT CODE FORM, AND/OR ALL RELATED MATERIALS.
BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING THE SOFTWARE, YOU ACCEPT THE FOLLOWING TERMS
AND CONDITIONS. IF YOU DO NOT AGREE WITH ANY OF THE TERMS OR CONDITIONS OF THIS LICENSE AGREEMENT,
DO NOT PROCEED WITH THE DOWNLOADING, COPYING, INSTALLATION OR ANY OTHER USE OF THE SOFTWARE OR ANY
PORTION THEREOF AS YOU HAVE NO RIGHTS TO DO SO. THE SOFTWARE IS PROTECTED BY UNITED STATES
COPYRIGHT LAWS AND INTERNATIONAL COPYRIGHT LAWS, AS WELL AS OTHER INTELLECTUAL PROPERTY LAWS AND
View retyped.hello.world.cs
using static Retyped.dom;
public class Program
{
public static void Main()
{
alert("Hello, World!");
}
}
View bridge.html5.vs.retyped.cs
// 1. Update using statements:
// Old Bridge.Html5
using Bridge.Html5;
// New Retyped
using static Retyped.dom;
// 2. Class names should be the same:
View retyped.dom.cs
// Create a new Button Element
var button = new HTMLButtonElement();
// Set the Button text
button.innerHTML = "Click Me";
// Add a Click event handler
button.addEventListener("click", () =>
{
// Write a message to the Console
View bridge-index.html
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>MyApp</title>
<script src="bridge.js"></script>
<script src="bridge.console.js"></script>
<script src="demo.js"></script>
View json.net.cs
Product product = new Product();
product.Name = "Apple";
product.ExpiryDate = new DateTime(2008, 12, 28);
product.Price = 3.99M;
product.Sizes = new string[] { "Small", "Medium", "Large" };
string output = JsonConvert.SerializeObject(product);
//{
View bridge-net-v1-12-released-sample9.cs
// We need the Timer reference to have access to it in the callback
public static Timer timer;
// A flag of changing the Timer's due time and period
public static bool timerChanged;
public static void Main()
{
// The Timer callback
TimerCallback callback = (state) =>