Exemple #1
0
        /// <summary>Initializes a new <see cref="AsyncTaskMethodBuilder"/>.</summary>
        /// <returns>The initialized <see cref="AsyncTaskMethodBuilder"/>.</returns>
        public static AsyncTaskMethodBuilder Create()
        {
            AsyncTaskMethodBuilder atmb = default(AsyncTaskMethodBuilder);

            // On ProjectN we will eagerly initalize the task and it's Id if the debugger is attached
            atmb.m_task = (Task <VoidTaskResult>)atmb.GetTaskIfDebuggingEnabled();
            if (atmb.m_task != null)
            {
                int i = atmb.m_task.Id;
            }
            return(atmb);
        }