示例#1
0
        protected override void Initialize()
        {
            base.Initialize();

            _factory = new MigrateCosmosProjectFactory();
            RegisterProjectFactory(_factory);
        }
 protected override Tasks.Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
 {
     _factory = new MigrateXprojProjectFactory(new ProcessRunner(), new FileSystem());
     _factory.SetSite(this);
     RegisterProjectFactory(_factory);
     return(Tasks.Task.CompletedTask);
 }
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            _factory = new MigrateXprojProjectFactory(new ProcessRunner(), new Win32FileSystem(), ServiceProvider.GlobalProvider);
            _factory.SetSite(new ServiceProviderToOleServiceProviderAdapter(ServiceProvider.GlobalProvider));
            RegisterProjectFactory(_factory);
        }
示例#4
0
        protected override async Task InitializeAsync(
            CancellationToken cancellationToken,
            IProgress <ServiceProgressData> progress)
        {
            await base.InitializeAsync(cancellationToken, progress).ConfigureAwait(false);

            await JoinableTaskFactory.SwitchToMainThreadAsync();

            _factory = new MigrateCosmosProjectFactory();
            RegisterProjectFactory(_factory);
        }
示例#5
0
        public int RegisterProjectType(ref Guid rguidProjType, IVsProjectFactory pVsPF, out uint pdwCookie)
        {
            var iid      = Guid.NewGuid();
            var project  = IntPtr.Zero;
            var canceled = 0;
            var href     = 0;
            var flags    = (uint)__VSCREATEPROJFLAGS.CPF_CLONEFILE;

            pdwCookie = 1;

            href = pVsPF.CreateProject(null, @"C:\Users\Ken\Documents\Mind Chemistry\Hydra\VisualStudioProvider.Services\ProjectFolder\FSharpProject.fsproj", @"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\FSharp\Windows\1033\ConsoleApplication.zip", flags, ref iid, out project, out canceled);

            return(0);
        }
示例#6
0
 public int RegisterProjectType(ref Guid rguidProjType, IVsProjectFactory pVsPF, out uint pdwCookie)
 {
     _projectFactories[rguidProjType] = pVsPF;
     pdwCookie = 1;
     return(VSConstants.S_OK);
 }
示例#7
0
 public int GetProjectFactory(uint dwReserved, Guid[] pguidProjectType, string pszMkProject, out IVsProjectFactory ppProjectFactory)
 {
     throw new NotImplementedException();
 }
示例#8
0
 /// <summary>
 /// The get project factory.
 /// </summary>
 /// <param name="dwReserved">
 /// The dw reserved.
 /// </param>
 /// <param name="pguidProjectType">
 /// The pguid project type.
 /// </param>
 /// <param name="pszMkProject">
 /// The psz mk project.
 /// </param>
 /// <param name="ppProjectFactory">
 /// The pp project factory.
 /// </param>
 /// <returns>
 /// The get project factory.
 /// </returns>
 /// <exception cref="Exception">
 /// </exception>
 public int GetProjectFactory(uint dwReserved, Guid[] pguidProjectType, string pszMkProject, out IVsProjectFactory ppProjectFactory)
 {
     throw new Exception("The method or operation is not implemented.");
 }
 public int RegisterProjectType(ref Guid rguidProjType, IVsProjectFactory pVsPF, out uint pdwCookie)
 {
     rguidProjType = Guid.Empty;
     pdwCookie     = 0;
     return(VSConstants.S_OK);
 }
 int IVsSolution2.GetProjectFactory(uint dwReserved, ref Guid pguidProjectType, string pszMkProject, out IVsProjectFactory ppProjectFactory)
 {
     throw new NotImplementedException();
 }
 public int RegisterProjectType(ref Guid rguidProjType, IVsProjectFactory pVsPF, out uint pdwCookie) {
     _projectFactories[rguidProjType] = pVsPF;
     pdwCookie = 1;
     return VSConstants.S_OK;
 }
 public int GetProjectFactory(uint dwReserved, Guid[] pguidProjectType, string pszMkProject, out IVsProjectFactory ppProjectFactory) {
     throw new NotImplementedException();
 }
示例#13
0
		public int GetProjectFactory(uint dwReserved, Guid[] pguidProjectType, string pszMkProject, out IVsProjectFactory ppProjectFactory)
		{
			ppProjectFactory = null;
			return VSConstants.E_NOTIMPL;
		}
示例#14
0
        public int GetProjectFactory(uint dwReserved, Guid[] pguidProjectType, string pszMkProject, out IVsProjectFactory ppProjectFactory)
        {
            ppProjectFactory = null;

            Debugger.Break();
            return(0);
        }
示例#15
0
 public int GetProjectFactory(uint dwReserved, Guid[] pguidProjectType, string pszMkProject, out IVsProjectFactory ppProjectFactory)
 {
     return(_solution.GetProjectFactory(dwReserved, pguidProjectType, pszMkProject, out ppProjectFactory));
 }
示例#16
0
 public int GetProjectFactory(uint dwReserved, Guid[] pguidProjectType, string pszMkProject, out IVsProjectFactory ppProjectFactory)
 {
     throw new Exception("The method or operation is not implemented.");
 }
 public int RegisterProjectType(ref Guid rguidProjType, IVsProjectFactory pVsPF, out uint pdwCookie)
 {
     rguidProjType = Guid.Empty;
     pdwCookie = 0;
     return VSConstants.S_OK;
 }
示例#18
0
 public int GetProjectFactory(uint dwReserved, Guid[] pguidProjectType, string pszMkProject, out IVsProjectFactory ppProjectFactory)
 {
     ppProjectFactory = null;
     return(VSConstants.S_OK);
 }
示例#19
0
        /// <include file='doc\Package.uex' path='docs/doc[@for="Package.RegisterEditorFactory"]/*' />
        /// <devdoc>
        /// Registers this project factory with Visual Studio.
        /// If you are providing an project factory, you should register
        /// it by overriding the Initialize method. Call 
        /// base.Initialize first, and then call RegisterProjectFactory
        /// for each project factory.  There is no need to unregister
        /// an project factory as the Package base class will handle this for you.
        /// Also, if your project factory is IDisposable, it will be
        /// disposed when it is unregistered.
        /// </devdoc>
        protected void RegisterProjectFactory(IVsProjectFactory factory) {
            IVsRegisterProjectTypes registerProjects = GetService(typeof(SVsRegisterProjectTypes)) as IVsRegisterProjectTypes;
            if (registerProjects == null) {
                throw new InvalidOperationException(SR.GetString(SR.Package_MissingService, typeof(SVsRegisterProjectTypes).FullName));
            }

            uint cookie;
            Guid riid = factory.GetType().GUID;

            NativeMethods.ThrowOnFailure( registerProjects.RegisterProjectType(ref riid, factory, out cookie) );

            if (_projectFactories == null) {
                _projectFactories = new Hashtable();
            }

            _projectFactories[factory] = cookie;
        }
示例#20
0
 int IVsSolution.GetProjectFactory(uint reserved, Guid[] projectType, string project, out IVsProjectFactory projectFactory)
 {
     throw new NotImplementedException();
 }
示例#21
0
 int IVsSolution.GetProjectFactory(uint reserved, Guid[] projectType, string project, out IVsProjectFactory projectFactory)
 {
     throw new NotImplementedException();
 }