source: other-projects/playing-in-the-street/summer-2013/trunk/Microsoft.Samples.Kinect.Webserver/SharedConstants.cs@ 28896

Last change on this file since 28896 was 28896, checked in by davidb, 10 years ago

Core Web Server that connects to the Kinect device

File size: 2.0 KB
Line 
1// -----------------------------------------------------------------------
2// <copyright file="SharedConstants.cs" company="Microsoft">
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// </copyright>
5// -----------------------------------------------------------------------
6
7namespace Microsoft.Samples.Kinect.Webserver
8{
9 using System.Threading.Tasks;
10
11 /// <summary>
12 /// Placeholder class that declares commonly used constants and configuration values.
13 /// </summary>
14 internal static class SharedConstants
15 {
16 /// <summary>
17 /// Invalid tracking identifier.
18 /// </summary>
19 internal const int InvalidUserTrackingId = 0;
20
21 /// <summary>
22 /// Maximum number of users that can get assigned a skeleton tracking id.
23 /// </summary>
24 internal const int MaxUsersTracked = 6;
25
26 /// <summary>
27 /// Array of standard character delimiters used to separate path components in a URI
28 /// string.
29 /// </summary>
30 internal static readonly char[] UriPathComponentDelimiters = new[] { '/', '?' };
31
32 /// <summary>
33 /// Empty task with a <see cref="TaskStatus.RanToCompletion"/> status, so awaiting
34 /// on task will return immediately.
35 /// </summary>
36 /// <remarks>
37 /// This is a helper value to be returned from synchronous functions that implement
38 /// an asynchronous contract, so clients can always await without needing to check
39 /// for null.
40 /// </remarks>
41 internal static readonly Task EmptyCompletedTask = Task.FromResult(0);
42
43 /// <summary>
44 /// Create a new task that will block all clients awaiting on it until
45 /// <see cref="Task.Start()"/> is called on it.
46 /// </summary>
47 /// <returns>
48 /// New await-able task.
49 /// </returns>
50 internal static Task CreateNonstartedTask()
51 {
52 return new Task(() => { });
53 }
54 }
55}
Note: See TracBrowser for help on using the repository browser.