diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Base64EncodedHubProtocol.spec.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Base64EncodedHubProtocol.spec.ts index 7bd728f94c..2771a7c6d2 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Base64EncodedHubProtocol.spec.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Base64EncodedHubProtocol.spec.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + import { Base64EncodedHubProtocol } from "../Microsoft.AspNetCore.SignalR.Client.TS/Base64EncodedHubProtocol" import { IHubProtocol, HubMessage, ProtocolType } from "../Microsoft.AspNetCore.SignalR.Client.TS/IHubProtocol" diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Common.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Common.ts index e40b74eda6..ed43ca5e57 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Common.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Common.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + import { ITransport, TransportType } from "../Microsoft.AspNetCore.SignalR.Client.TS/Transports" export function eachTransport(action: (transport: TransportType) => void) { diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Connection.spec.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Connection.spec.ts index c17a15e5aa..00b3e597ee 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Connection.spec.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Connection.spec.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + import { IHttpClient } from "../Microsoft.AspNetCore.SignalR.Client.TS/HttpClient" import { HttpConnection } from "../Microsoft.AspNetCore.SignalR.Client.TS/HttpConnection" import { IHttpConnectionOptions } from "../Microsoft.AspNetCore.SignalR.Client.TS/IHttpConnectionOptions" diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Formatters.spec.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Formatters.spec.ts index 9a5dfeb4cb..e0ab806c86 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Formatters.spec.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/Formatters.spec.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + import { TextMessageFormat, BinaryMessageFormat } from "../Microsoft.AspNetCore.SignalR.Client.TS/Formatters" describe("Text Message Formatter", () => { diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/HubConnection.spec.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/HubConnection.spec.ts index 20cf28ffcf..c44a02ff5e 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/HubConnection.spec.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/HubConnection.spec.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + import { IConnection } from "../Microsoft.AspNetCore.SignalR.Client.TS/IConnection" import { HubConnection } from "../Microsoft.AspNetCore.SignalR.Client.TS/HubConnection" import { DataReceived, ConnectionClosed } from "../Microsoft.AspNetCore.SignalR.Client.TS/Common" diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/JasmineUtils.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/JasmineUtils.ts index a546807526..be452ac96f 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/JasmineUtils.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/JasmineUtils.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + export function asyncit(expectation: string, assertion?: () => Promise, timeout?: number): void { let testFunction: (done: DoneFn) => void; if (assertion) { diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/MessagePackHubProtocol.spec.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/MessagePackHubProtocol.spec.ts index 8d62a2c30a..5b5e373082 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/MessagePackHubProtocol.spec.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/MessagePackHubProtocol.spec.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + import { MessagePackHubProtocol } from "../Microsoft.AspNetCore.SignalR.Client.TS/MessagePackHubProtocol" import { MessageType, InvocationMessage, CompletionMessage, ResultMessage } from "../Microsoft.AspNetCore.SignalR.Client.TS/IHubProtocol" diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Base64EncodedHubProtocol.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Base64EncodedHubProtocol.ts index acdb6cf194..1015fd5609 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Base64EncodedHubProtocol.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Base64EncodedHubProtocol.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + import { IHubProtocol, HubMessage, ProtocolType } from "./IHubProtocol" export class Base64EncodedHubProtocol implements IHubProtocol { diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Common.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Common.ts index f54f74cfac..a5a7029f55 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Common.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Common.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + export declare type DataReceived = (data: any) => void; export declare type ConnectionClosed = (e?: Error) => void; export declare type TransportClosed = (e?: Error) => void; diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Formatters.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Formatters.ts index 9f2de9fa0a..adc794a884 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Formatters.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Formatters.ts @@ -1,4 +1,6 @@ - +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + export namespace TextMessageFormat { const RecordSeparator = String.fromCharCode(0x1e); diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HttpClient.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HttpClient.ts index 9223b95b37..df9d69ee95 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HttpClient.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HttpClient.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + import { HttpError } from "./HttpError" export interface IHttpClient { diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HttpConnection.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HttpConnection.ts index 641f3845f2..2549c72495 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HttpConnection.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HttpConnection.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + import { DataReceived, ConnectionClosed } from "./Common" import { IConnection } from "./IConnection" import { ITransport, TransferMode, TransportType, WebSocketTransport, ServerSentEventsTransport, LongPollingTransport } from "./Transports" diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HttpError.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HttpError.ts index e8c04c3e79..24e6383c0b 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HttpError.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HttpError.ts @@ -1,4 +1,7 @@ -export class HttpError extends Error { +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +export class HttpError extends Error { statusCode: number; constructor(errorMessage: string, statusCode: number) { super(errorMessage); diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HubConnection.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HubConnection.ts index 2d681793bd..4c257c6d20 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HubConnection.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/HubConnection.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + import { ConnectionClosed } from "./Common" import { IConnection } from "./IConnection" import { TransportType, TransferMode } from "./Transports" diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/IConnection.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/IConnection.ts index dee6616196..ef90d27a98 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/IConnection.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/IConnection.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + import { DataReceived, ConnectionClosed } from "./Common" import { TransportType, TransferMode, ITransport } from "./Transports" diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/IHttpConnectionOptions.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/IHttpConnectionOptions.ts index c722ca3a6d..aebb2a50a0 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/IHttpConnectionOptions.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/IHttpConnectionOptions.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + import { IHttpClient } from "./HttpClient" import { TransportType, ITransport } from "./Transports" import { ILogger, LogLevel } from "./ILogger"; diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/IHubProtocol.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/IHubProtocol.ts index 6f81641380..d8a1da9668 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/IHubProtocol.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/IHubProtocol.ts @@ -1,4 +1,7 @@ -export const enum MessageType { +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +export const enum MessageType { Invocation = 1, Result, Completion diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/ILogger.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/ILogger.ts index 43047c1261..b45dadf4ef 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/ILogger.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/ILogger.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + export enum LogLevel { Information = 0, Warning, diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/JsonHubProtocol.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/JsonHubProtocol.ts index 67158168ee..4502110373 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/JsonHubProtocol.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/JsonHubProtocol.ts @@ -1,4 +1,7 @@ -import { TextMessageFormat } from "./Formatters"; +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +import { TextMessageFormat } from "./Formatters"; import { IHubProtocol, ProtocolType, HubMessage } from "./IHubProtocol"; export class JsonHubProtocol implements IHubProtocol { diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Loggers.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Loggers.ts index 3dd49d3ef5..ddc08106ee 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Loggers.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Loggers.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + import { ILogger, LogLevel } from "./ILogger" export class NullLogger implements ILogger { diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/MessagePackHubProtocol.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/MessagePackHubProtocol.ts index 5892cc744f..05d9f1ba7e 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/MessagePackHubProtocol.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/MessagePackHubProtocol.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + import { IHubProtocol, ProtocolType, MessageType, HubMessage, InvocationMessage, ResultMessage, CompletionMessage } from "./IHubProtocol"; import { BinaryMessageFormat } from "./Formatters" import * as msgpack5 from "msgpack5" diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Observable.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Observable.ts index 8c527f0dbf..105b01b8d4 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Observable.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Observable.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + // TODO: Seamless RxJs integration // From RxJs: https://github.com/ReactiveX/rxjs/blob/master/src/Observer.ts export interface Observer { diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Transports.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Transports.ts index 3830c24339..ecadd77ffa 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Transports.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Transports.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + import { DataReceived, TransportClosed } from "./Common" import { IHttpClient } from "./HttpClient" import { HttpError } from "./HttpError" diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/index.ts b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/index.ts index de2de2f719..1f9945e6e6 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/index.ts +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/index.ts @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + export * from "./Common" export * from "./HttpConnection" export * from "./HttpClient" diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/common.js b/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/common.js index 3be66a15da..eeae3d9c6b 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/common.js +++ b/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/common.js @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + "use strict"; var ECHOENDPOINT_URL = "http://" + document.location.host + "/echo"; diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/connectionTests.js b/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/connectionTests.js index 903538c49a..d2c6e59911 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/connectionTests.js +++ b/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/connectionTests.js @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + "use strict"; describe('connection', function () { diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/hubConnectionTests.js b/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/hubConnectionTests.js index ba0d41387b..d91a9d505d 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/hubConnectionTests.js +++ b/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/hubConnectionTests.js @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + 'use strict'; var TESTHUBENDPOINT_URL = 'http://' + document.location.host + '/testhub'; diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/webSocketTests.js b/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/webSocketTests.js index 42ead2c96b..12a26d2e7c 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/webSocketTests.js +++ b/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/webSocketTests.js @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + 'use strict'; describe('WebSockets', function () {