Permalink
Browse files

Add Unity Project

  • Loading branch information...
1 parent 693b0ef commit 4d0113a59e91db10fff7306faae09bf58fb25520 @neuecc committed Dec 14, 2016
Showing 675 changed files with 52,379 additions and 1 deletion.
View
@@ -108,4 +108,9 @@ UpgradeLog*.XML
.vs/config/applicationhost.config
.vs/restore.dg
-# Unity
+# Unity
+
+src/MagicOnion.Client.Unity/bin/*
+src/MagicOnion.Client.Unity/Library/*
+src/MagicOnion.Client.Unity/obj/*
+src/MagicOnion.Client.Unity/Temp/*
@@ -11,6 +11,7 @@ static void Main(string[] args)
{
Console.WriteLine("Server:::");
+ Environment.SetEnvironmentVariable("GRPC_VERBOSITY", "DEBUG");
Environment.SetEnvironmentVariable("GRPC_TRACE", "all");
GrpcEnvironment.SetLogger(new ConsoleLogger());
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: a47f43e0f8940e24b8a38b0427974dfb
+folderAsset: yes
+timeCreated: 1481691988
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 0c8eb5494eb08cf48b32efee25b2b690
+folderAsset: yes
+timeCreated: 1481692004
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: b7300904d45a3b24d960d09da76c41b3
+folderAsset: yes
+timeCreated: 1481692009
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: a2222e11e45e11b48b43f47d96e9e9aa
+folderAsset: yes
+timeCreated: 1481692106
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 1f48c7572dd69844993ccbcc86531c81
+folderAsset: yes
+timeCreated: 1481692106
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 0275a59a0a91f8145b4e302100a2d4c2
+folderAsset: yes
+timeCreated: 1481692106
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Text;
+using System.Threading;
+
+namespace UniRx
+{
+ public static class WebRequestExtensions
+ {
+ static IObservable<TResult> AbortableDeferredAsyncRequest<TResult>(Func<AsyncCallback, object, IAsyncResult> begin, Func<IAsyncResult, TResult> end, WebRequest request)
+ {
+ var result = Observable.Create<TResult>(observer =>
+ {
+ var isCompleted = -1;
+ var subscription = Observable.FromAsyncPattern<TResult>(begin,
+ ar =>
+ {
+ try
+ {
+ Interlocked.Increment(ref isCompleted);
+ return end(ar);
+ }
+ catch (WebException ex)
+ {
+ if (ex.Status == WebExceptionStatus.RequestCanceled) return default(TResult);
+ throw;
+ }
+ })()
+ .Subscribe(observer);
+ return Disposable.Create(() =>
+ {
+ if (Interlocked.Increment(ref isCompleted) == 0)
+ {
+ subscription.Dispose();
+ request.Abort();
+ }
+ });
+ });
+
+ return result;
+ }
+
+ public static IObservable<WebResponse> GetResponseAsObservable(this WebRequest request)
+ {
+ return AbortableDeferredAsyncRequest<WebResponse>(request.BeginGetResponse, request.EndGetResponse, request);
+ }
+
+ public static IObservable<HttpWebResponse> GetResponseAsObservable(this HttpWebRequest request)
+ {
+ return AbortableDeferredAsyncRequest<HttpWebResponse>(request.BeginGetResponse, ar => (HttpWebResponse)request.EndGetResponse(ar), request);
+ }
+
+ public static IObservable<Stream> GetRequestStreamAsObservable(this WebRequest request)
+ {
+ return AbortableDeferredAsyncRequest<Stream>(request.BeginGetRequestStream, request.EndGetRequestStream, request);
+ }
+ }
+}
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 457f0007b2c70e34e9929ec8f0e2c4e6
+timeCreated: 1455373898
+licenseType: Store
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: fc7a04b6310ac574181bbdb3598c841d
+folderAsset: yes
+timeCreated: 1481692107
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
@@ -0,0 +1,25 @@
+using System;
+using System.Collections;
+
+namespace UniRx
+{
+ public sealed class BooleanDisposable : IDisposable, ICancelable
+ {
+ public bool IsDisposed { get; private set; }
+
+ public BooleanDisposable()
+ {
+
+ }
+
+ internal BooleanDisposable(bool isDisposed)
+ {
+ IsDisposed = isDisposed;
+ }
+
+ public void Dispose()
+ {
+ if (!IsDisposed) IsDisposed = true;
+ }
+ }
+}
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4ff95c6eb380ca248984d8c27c1244d0
+timeCreated: 1455373899
+licenseType: Store
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
@@ -0,0 +1,67 @@
+// original code from GitHub Reactive-Extensions/Rx.NET
+// some modified.
+
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+#if (ENABLE_MONO_BLEEDING_EDGE_EDITOR || ENABLE_MONO_BLEEDING_EDGE_STANDALONE)
+
+using System;
+using System.Threading;
+
+namespace UniRx
+{
+ /// <summary>
+ /// Represents a disposable resource that has an associated <seealso cref="T:System.Threading.CancellationToken"/> that will be set to the cancellation requested state upon disposal.
+ /// </summary>
+ public sealed class CancellationDisposable : ICancelable
+ {
+ private readonly CancellationTokenSource _cts;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:System.Reactive.Disposables.CancellationDisposable"/> class that uses an existing <seealso cref="T:System.Threading.CancellationTokenSource"/>.
+ /// </summary>
+ /// <param name="cts"><seealso cref="T:System.Threading.CancellationTokenSource"/> used for cancellation.</param>
+ /// <exception cref="ArgumentNullException"><paramref name="cts"/> is null.</exception>
+ public CancellationDisposable(CancellationTokenSource cts)
+ {
+ if (cts == null)
+ throw new ArgumentNullException("cts");
+
+ _cts = cts;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:System.Reactive.Disposables.CancellationDisposable"/> class that uses a new <seealso cref="T:System.Threading.CancellationTokenSource"/>.
+ /// </summary>
+ public CancellationDisposable()
+ : this(new CancellationTokenSource())
+ {
+ }
+
+ /// <summary>
+ /// Gets the <see cref="T:System.Threading.CancellationToken"/> used by this CancellationDisposable.
+ /// </summary>
+ public CancellationToken Token
+ {
+ get { return _cts.Token; }
+ }
+
+ /// <summary>
+ /// Cancels the underlying <seealso cref="T:System.Threading.CancellationTokenSource"/>.
+ /// </summary>
+ public void Dispose()
+ {
+ _cts.Cancel();
+ }
+
+ /// <summary>
+ /// Gets a value that indicates whether the object is disposed.
+ /// </summary>
+ public bool IsDisposed
+ {
+ get { return _cts.IsCancellationRequested; }
+ }
+ }
+}
+
+#endif
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6c675907554bfa24d8bd411f386e410d
+timeCreated: 1475137543
+licenseType: Store
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
Oops, something went wrong.

0 comments on commit 4d0113a

Please sign in to comment.