http://blogs.msdn.com/b/dotnet/archive/2014/05/09/the-net-native-tool-chain.aspx
Introducing ASP.NET vNext The Next Generation of .NET – ASP.NET vNext
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web.Http; | |
using System.Web.Mvc; | |
namespace D3jsSample.Controllers | |
{ | |
public class DataBlobController : ApiController | |
{ |
@{ | |
Layout = null; | |
} | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>D3 line chart</title> | |
<script src="@Url.Content("~/Scripts/jquery-1.8.2.min.js")"></script> | |
<script src="@Url.Content("~/Scripts/modernizr-2.6.2.js")" |
var bigquery = new BigqueryService(new BaseClientService.Initializer | |
{ | |
ApplicationName = "BigQuery Sample", | |
ApiKey = "ApiKey" | |
}); | |
await bigquery.Tables.Insert(new Table | |
{ | |
FriendlyName = "MyTableFriendyName", | |
Description = "My Table Description", | |
Schema = new TableSchema |
var log = MyEventSource.Log; | |
log.Debug("Debug"); |
using (var mc = new ManagementClass("Win32_Process")) | |
using (var moc = mc.GetInstances()) | |
{ | |
foreach (ManagementObject mo in moc) | |
using (mo) | |
{ | |
try | |
{ | |
var outParams = mo.InvokeMethod("GetOwner", null, null); | |
var user = outParams["User"]; |
static string GetOwner(uint processId) | |
{ | |
using (var mc = new ManagementClass("Win32_Process")) | |
using (var moc = mc.GetInstances()) | |
{ | |
var mo = moc.Cast<ManagementObject>() | |
.First(m => m["ProcessId"] as uint? == processId); | |
var outParams = mo.InvokeMethod("GetOwner", null, null); | |
return outParams["User"] as string; |
@{ | |
Layout = null; | |
} | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width" /> | |
<title>Index</title> |
public class Library | |
{ | |
public IObservable<string> InvokeHello() | |
{ | |
var subject = new Subject<string>(); | |
ThreadPool.QueueUserWorkItem(async _ => | |
{ | |
await Task.Delay(TimeSpan.FromSeconds(1)); | |
subject.OnNext("start"); | |
await Task.Delay(TimeSpan.FromSeconds(1)); |
using System.Management.Automation; | |
using System.Reactive.Linq; | |
using ObservableCmdlet.Lib; | |
namespace ObservableCmdletSample | |
{ | |
[Cmdlet("Invoke", "BadHelloRx")] | |
public class BadRxCmdlet : Cmdlet | |
{ | |
protected override void ProcessRecord() |