Skip to content

Commit

Permalink
Add Microsoft copyright and MIT license header to csharp files.
Browse files Browse the repository at this point in the history
  • Loading branch information
sanketj committed Mar 7, 2019
1 parent e78d0ca commit ac7f4cd
Show file tree
Hide file tree
Showing 36 changed files with 608 additions and 320 deletions.
10 changes: 9 additions & 1 deletion server/DeployJsDbg/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.IO;
using System.Linq;
using System.Threading;
Expand Down
10 changes: 9 additions & 1 deletion server/JsDbg.Core/BrowserLauncher.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.Diagnostics;
using System.IO;

Expand Down
10 changes: 9 additions & 1 deletion server/JsDbg.Core/ConstantCache.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down
10 changes: 9 additions & 1 deletion server/JsDbg.Core/DiaHelpers.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down
10 changes: 9 additions & 1 deletion server/JsDbg.Core/DiaSessionLoader.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Dia2Lib;
Expand Down
10 changes: 9 additions & 1 deletion server/JsDbg.Core/FileCache.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
Expand Down
12 changes: 10 additions & 2 deletions server/JsDbg.Core/IDebugger.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Threading.Tasks;

Expand Down Expand Up @@ -86,7 +94,7 @@ public interface IDebugger {

void Dispose();
uint TargetProcess { get; set; }
Task<uint[]> GetAttachedProcesses();
Task<uint[]> GetAttachedProcesses();
uint TargetThread { get; set; }
Task<uint[]> GetCurrentProcessThreads();
Task<IEnumerable<SFieldResult>> GetAllFields(string module, string typename, bool includeBaseTypes);
Expand Down
10 changes: 9 additions & 1 deletion server/JsDbg.Core/IDiaSessionSource.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.Threading.Tasks;
using Dia2Lib;

Expand Down
14 changes: 11 additions & 3 deletions server/JsDbg.Core/ITypeCacheDebuggerEngine.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down Expand Up @@ -28,8 +36,8 @@ public interface ITypeCacheDebuggerEngine {

uint TargetProcess { get; set; }

Task<uint[]> GetAttachedProcesses();

Task<uint[]> GetAttachedProcesses();

uint TargetThread { get; set; }

Task<uint[]> GetCurrentProcessThreads();
Expand Down
28 changes: 18 additions & 10 deletions server/JsDbg.Core/PersistentStore.cs
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.IO;
using System.Linq;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;


namespace JsDbg.Core {
public class PersistentStore {
private static Encoding Encoding {
get { return Encoding.UTF8; }
}

private static string PersistentStoreFileName {
get { return "jsdbg-persistent-store.json"; }
private static string PersistentStoreFileName {
get { return "jsdbg-persistent-store.json"; }
}

public PersistentStore() {
public PersistentStore() {
}

private string GetPath(string user) {
if (user == null) {
user = System.Environment.UserDomainName + "." + System.Environment.UserName;
}
return user;
}
}

public Task<string> Get(string user) {
return this.AttemptFileOperation<string>(() => {
Expand All @@ -33,9 +41,9 @@ public Task<string> Get(string user) {

public Task<bool> Set(string value) {
return this.AttemptFileOperation<bool>(() => {
using (FileStream fs = File.Create(Path.GetTempPath() + PersistentStore.PersistentStoreFileName)) {
byte[] valueToWrite = PersistentStore.Encoding.GetBytes(value);
fs.Write(valueToWrite, 0, valueToWrite.Length);
using (FileStream fs = File.Create(Path.GetTempPath() + PersistentStore.PersistentStoreFileName)) {
byte[] valueToWrite = PersistentStore.Encoding.GetBytes(value);
fs.Write(valueToWrite, 0, valueToWrite.Length);
}
return Task.FromResult<bool>(true);
});
Expand Down
10 changes: 9 additions & 1 deletion server/JsDbg.Core/TypeCache.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.Collections.Generic;
using Dia2Lib;

Expand Down
10 changes: 9 additions & 1 deletion server/JsDbg.Core/TypeCacheDebugger.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
Expand Down
10 changes: 9 additions & 1 deletion server/JsDbg.Core/WebServer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down
10 changes: 9 additions & 1 deletion server/JsDbg.Remoting/RemotingServer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.IO.Pipes;
using System.Security.Cryptography;
using System.Text;
Expand Down
10 changes: 9 additions & 1 deletion server/JsDbg.VisualStudio/AutoUpdater.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down
10 changes: 9 additions & 1 deletion server/JsDbg.VisualStudio/Configuration.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
Expand Down
36 changes: 22 additions & 14 deletions server/JsDbg.VisualStudio/DebuggerEngine.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using System;
//--------------------------------------------------------------
//
// MIT License
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.VisualStudio.Debugger.Interop;
Expand All @@ -25,34 +33,34 @@ public Dia.DiaSessionLoader DiaLoader {
set { this.diaLoader = value; }
}

public bool IsDebuggerBusy {
get { return this.runner.IsDebuggerBusy; }
public bool IsDebuggerBusy {
get { return this.runner.IsDebuggerBusy; }
}

public bool IsPointer64Bit {
get { return this.runner.IsPointer64Bit; }
}

}

public uint TargetProcess {
get { return this.runner.TargetProcessSystemId; }
set { this.runner.SetTargetProcess(value); }
}

public Task<uint[]> GetAttachedProcesses() {
return Task.FromResult<uint[]>(this.runner.GetAttachedProcesses());
}

public Task<uint[]> GetAttachedProcesses() {
return Task.FromResult<uint[]>(this.runner.GetAttachedProcesses());
}

public uint TargetThread {
get { return this.runner.TargetThreadSystemId; }
set { this.runner.SetTargetThread(value); }
}

public Task<uint[]> GetCurrentProcessThreads() {
return Task.FromResult<uint[]>(this.runner.GetCurrentProcessThreads());
}
public Task<uint[]> GetCurrentProcessThreads() {
return Task.FromResult<uint[]>(this.runner.GetCurrentProcessThreads());
}

public async Task<ulong> TebAddress() {
await this.runner.WaitForBreakIn();
public async Task<ulong> TebAddress() {
await this.runner.WaitForBreakIn();
return this.runner.TebAddress();
}

Expand Down
Loading

0 comments on commit ac7f4cd

Please sign in to comment.