Microsoft.VisualStudio.Project.ProjectFactory.CreateProjectAsync C# (CSharp) Method

CreateProjectAsync() public method

public CreateProjectAsync ( System.Guid &rguidProjectID, string filename, string location, string pszName, uint flags ) : IVsTask
rguidProjectID System.Guid
filename string
location string
pszName string
flags uint
return IVsTask
        public virtual IVsTask CreateProjectAsync(ref Guid rguidProjectID, string filename, string location, string pszName, uint flags)
        {
            Guid iid = typeof(IVsHierarchy).GUID;
            return VsTaskLibraryHelper.CreateAndStartTask(taskSchedulerService.Value, VsTaskRunContext.UIThreadBackgroundPriority, VsTaskLibraryHelper.CreateTaskBody(() =>
            {
                IntPtr project;
                int cancelled;
                CreateProject(filename, location, pszName, flags, ref iid, out project, out cancelled);
                if (cancelled != 0)
                {
                    throw new OperationCanceledException();
                }

                return Marshal.GetObjectForIUnknown(project);
            }));
        }