예제 #1
0
 public void CompileFile(string virtualPath, ClientBuildManagerCallback callback)
 {
     // 1. Creates the Host
     // This creates a .compiled file + an assembly
     // App_Code reported to be built *before* anything else (with progress callback)
     throw new NotImplementedException();
 }
        public void PrecompileApplication(ClientBuildManagerCallback callback, bool forceCleanBuild)
        {
            PrecompilationFlags precompilationFlags = this._hostingParameters.ClientBuildManagerParameter.PrecompilationFlags;

            if (forceCleanBuild)
            {
                this._waitForCallBack = this._host != null;
                this.Unload();
                this._hostingParameters.ClientBuildManagerParameter.PrecompilationFlags = precompilationFlags | PrecompilationFlags.Clean;
                this.WaitForCallBack();
            }
            try
            {
                this.EnsureHostCreated();
                this._host.PrecompileApp(callback);
            }
            finally
            {
                if (forceCleanBuild)
                {
                    this._hostingParameters.ClientBuildManagerParameter.PrecompilationFlags = precompilationFlags;
                }
                if (callback != null)
                {
                    RemotingServices.Disconnect(callback);
                }
            }
        }
 internal void PrecompileApp(ClientBuildManagerCallback callback)
 {
     this.AddPendingCall();
     try
     {
         this._buildManager.PrecompileApp(callback);
     }
     finally
     {
         this.RemovePendingCall();
     }
 }
예제 #4
0
        internal void PrecompileApp(ClientBuildManagerCallback callback, List <string> excludedVirtualPaths)
        {
            // Add a pending call to make sure our thread doesn't get killed
            AddPendingCall();

            try {
                _buildManager.PrecompileApp(callback, excludedVirtualPaths);
            }
            finally {
                RemovePendingCall();
            }
        }
 public void CompileFile(string virtualPath, ClientBuildManagerCallback callback)
 {
     if (virtualPath == null)
     {
         throw new ArgumentNullException("virtualPath");
     }
     try
     {
         this.EnsureHostCreated();
         this._host.GetCompiledTypeAndAssemblyName(VirtualPath.Create(virtualPath), callback);
     }
     finally
     {
         if (callback != null)
         {
             RemotingServices.Disconnect(callback);
         }
     }
 }
예제 #6
0
        internal string[] GetCompiledTypeAndAssemblyName(VirtualPath virtualPath, ClientBuildManagerCallback callback)
        {
            // Add a pending call to make sure our thread doesn't get killed
            AddPendingCall();

            try {
            // Treat it as relative to the app root
            virtualPath.CombineWithAppRoot();

            Type t = BuildManager.GetCompiledType(virtualPath, callback);

            if (t == null) return null;

            string assemblyPath = Util.GetAssemblyPathFromType(t);
            return new string[] { t.FullName, assemblyPath };
            }
            finally {
            RemovePendingCall();
            }
        }
        public void PrecompileApplication(ClientBuildManagerCallback callback, bool forceCleanBuild)
        {
            Debug.Trace("CBM", "PrecompileApplication");

            PrecompilationFlags savedFlags = _hostingParameters.ClientBuildManagerParameter.PrecompilationFlags;

            if (forceCleanBuild)
            {
                // If there was a previous host, it will be unloaded by CBM and we will wait for the callback.
                // If there was no previous host, we don't do any waiting.
                // DevDiv 46290
                _waitForCallBack = _host != null;

                Debug.Trace("CBM", "Started Unload");
                // Unload the existing appdomain so the new one will be created with the clean flag
                Unload();

                _hostingParameters.ClientBuildManagerParameter.PrecompilationFlags =
                    savedFlags | PrecompilationFlags.Clean;

                WaitForCallBack();
            }

            try {
                EnsureHostCreated();
                _host.PrecompileApp(callback, _hostingParameters.ClientBuildManagerParameter.ExcludedVirtualPaths);
            }
            finally {
                if (forceCleanBuild)
                {
                    // Revert precompilationFlags
                    _hostingParameters.ClientBuildManagerParameter.PrecompilationFlags = savedFlags;
                }
                // DevDiv 180798. We are returning null in ClientBuildManagerCallback.InitializeLifetimeService,
                // so we need to manually disconnect the instance so that it will be released.
                if (callback != null)
                {
                    RemotingServices.Disconnect(callback);
                }
            }
        }
 internal string[] GetCompiledTypeAndAssemblyName(VirtualPath virtualPath, ClientBuildManagerCallback callback)
 {
     string[] strArray;
     this.AddPendingCall();
     try
     {
         virtualPath.CombineWithAppRoot();
         Type compiledType = BuildManager.GetCompiledType(virtualPath, callback);
         if (compiledType == null)
         {
             return(null);
         }
         string assemblyPathFromType = Util.GetAssemblyPathFromType(compiledType);
         strArray = new string[] { compiledType.FullName, assemblyPathFromType };
     }
     finally
     {
         this.RemovePendingCall();
     }
     return(strArray);
 }
        public void CompileFile(string virtualPath, ClientBuildManagerCallback callback)
        {
            Debug.Trace("CBM", "CompileFile " + virtualPath);

            if (virtualPath == null)
            {
                throw new ArgumentNullException("virtualPath");
            }

            try {
                EnsureHostCreated();
                _host.GetCompiledTypeAndAssemblyName(VirtualPath.Create(virtualPath), callback);
            }
            finally {
                // DevDiv 180798. We are returning null in ClientBuildManagerCallback.InitializeLifetimeService,
                // so we need to manually disconnect the instance so that it will be released.
                if (callback != null)
                {
                    RemotingServices.Disconnect(callback);
                }
            }
        }
예제 #10
0
        // This method is called by BuildManagerHost thru CBM
        internal static Type GetCompiledType(VirtualPath virtualPath, ClientBuildManagerCallback callback) {
            // Remember the original setting
            bool skipTopLevelExceptions = SkipTopLevelCompilationExceptions;
            bool throwOnFirstParseError = ThrowOnFirstParseError;

            try {
                // Don't skip top level compilation exceptions even called by CBM.
                SkipTopLevelCompilationExceptions = false;

                // Don't stop on the first parse error, process as many errors as possible.
                ThrowOnFirstParseError = false;

                _theBuildManager._cbmCallback = callback;
                return GetCompiledType(virtualPath);
            }
            finally {
                _theBuildManager._cbmCallback = null;

                // Revert to original setting
                SkipTopLevelCompilationExceptions = skipTopLevelExceptions;

                ThrowOnFirstParseError = throwOnFirstParseError;
            }
        }
 public void PrecompileApplication(ClientBuildManagerCallback callback)
 {
     this.PrecompileApplication(callback, false);
 }
    public void PrecompileApplication(ClientBuildManagerCallback callback, bool forceCleanBuild) {
        Debug.Trace("CBM", "PrecompileApplication");

        PrecompilationFlags savedFlags = _hostingParameters.ClientBuildManagerParameter.PrecompilationFlags;

        if (forceCleanBuild) {

            // If there was a previous host, it will be unloaded by CBM and we will wait for the callback.
            // If there was no previous host, we don't do any waiting.
            // DevDiv 46290
            _waitForCallBack = _host != null;

            Debug.Trace("CBM", "Started Unload");
            // Unload the existing appdomain so the new one will be created with the clean flag
            Unload();

            _hostingParameters.ClientBuildManagerParameter.PrecompilationFlags = 
                savedFlags | PrecompilationFlags.Clean;

            WaitForCallBack();
        }

        try {
            EnsureHostCreated();
            _host.PrecompileApp(callback, _hostingParameters.ClientBuildManagerParameter.ExcludedVirtualPaths);
        }
        finally {
            if (forceCleanBuild) {
                // Revert precompilationFlags
                _hostingParameters.ClientBuildManagerParameter.PrecompilationFlags = savedFlags;
            }
            // DevDiv 180798. We are returning null in ClientBuildManagerCallback.InitializeLifetimeService,
            // so we need to manually disconnect the instance so that it will be released.
            if (callback != null) {
                RemotingServices.Disconnect(callback);
            }
        }
    }
예제 #13
0
        internal void PrecompileApp(ClientBuildManagerCallback callback, IEnumerable<string> excludedVirtualPaths) {

            // Remember the original setting
            bool skipTopLevelExceptions = SkipTopLevelCompilationExceptions;

            try {
                _cbmCallback = callback;

                // Don't stop on the first parse errors, process as many errors as possible.
                ThrowOnFirstParseError = false;

                // Don't skip top level compilation exceptions even called by CBM.
                SkipTopLevelCompilationExceptions = false;

                PrecompileApp(HttpRuntime.AppDomainAppVirtualPathObject, excludedVirtualPaths);
            }
            finally {
                // Revert to original setting
                SkipTopLevelCompilationExceptions = skipTopLevelExceptions;
                ThrowOnFirstParseError = true;

                _cbmCallback = null;
            }
        }
    public void CompileFile(string virtualPath, ClientBuildManagerCallback callback) {
        Debug.Trace("CBM", "CompileFile " + virtualPath);

        if (virtualPath == null) {
            throw new ArgumentNullException("virtualPath");
        }

        try {
            EnsureHostCreated();
            _host.GetCompiledTypeAndAssemblyName(VirtualPath.Create(virtualPath), callback);
        }
        finally {
            // DevDiv 180798. We are returning null in ClientBuildManagerCallback.InitializeLifetimeService,
            // so we need to manually disconnect the instance so that it will be released.
            if (callback != null) {
                RemotingServices.Disconnect(callback);
            }
        }
    }
 /*
  * Precompile an application with callback support
  */
 public void PrecompileApplication(ClientBuildManagerCallback callback) {
     PrecompileApplication(callback, false);
 }
 public void PrecompileApplication(ClientBuildManagerCallback callback)
 {
 }
 internal void PrecompileApp(ClientBuildManagerCallback callback)
 {
     this.AddPendingCall();
     try
     {
         this._buildManager.PrecompileApp(callback);
     }
     finally
     {
         this.RemovePendingCall();
     }
 }
 public void PrecompileApplication(ClientBuildManagerCallback callback, bool forceCleanBuild)
 {
 }
예제 #19
0
 public void PrecompileApplication(ClientBuildManagerCallback callback, bool forceCleanBuild)
 {
     throw new NotImplementedException();
 }
 public void CompileFile(string virtualPath, ClientBuildManagerCallback callback)
 {
     if (virtualPath == null)
     {
         throw new ArgumentNullException("virtualPath");
     }
     try
     {
         this.EnsureHostCreated();
         this._host.GetCompiledTypeAndAssemblyName(VirtualPath.Create(virtualPath), callback);
     }
     finally
     {
         if (callback != null)
         {
             RemotingServices.Disconnect(callback);
         }
     }
 }
		public void PrecompileApplication (ClientBuildManagerCallback callback, bool forceCleanBuild)
		{
			throw new NotImplementedException ();
		}
		public void CompileFile (string virtualPath, ClientBuildManagerCallback callback)
		{
			// 1. Creates the Host
			// This creates a .compiled file + an assembly
			// App_Code reported to be built *before* anything else (with progress callback)
			throw new NotImplementedException ();
		}
 public void CompileFile(string virtualPath, ClientBuildManagerCallback callback)
 {
 }
예제 #24
0
 public void PrecompileApplication(ClientBuildManagerCallback callback)
 {
     _buildManager.PrecompileApplication(callback);
 }
 public void CompileFile(string virtualPath, ClientBuildManagerCallback callback)
 {
 }
 internal string[] GetCompiledTypeAndAssemblyName(VirtualPath virtualPath, ClientBuildManagerCallback callback)
 {
     string[] strArray;
     this.AddPendingCall();
     try
     {
         virtualPath.CombineWithAppRoot();
         Type compiledType = BuildManager.GetCompiledType(virtualPath, callback);
         if (compiledType == null)
         {
             return null;
         }
         string assemblyPathFromType = Util.GetAssemblyPathFromType(compiledType);
         strArray = new string[] { compiledType.FullName, assemblyPathFromType };
     }
     finally
     {
         this.RemovePendingCall();
     }
     return strArray;
 }
    internal void PrecompileApp(ClientBuildManagerCallback callback, List<string> excludedVirtualPaths) {
        // Add a pending call to make sure our thread doesn't get killed
        AddPendingCall();

        try {
            _buildManager.PrecompileApp(callback, excludedVirtualPaths);
        }
        finally {
            RemovePendingCall();
        }
    }
 public void PrecompileApplication(ClientBuildManagerCallback callback, bool forceCleanBuild)
 {
     PrecompilationFlags precompilationFlags = this._hostingParameters.ClientBuildManagerParameter.PrecompilationFlags;
     if (forceCleanBuild)
     {
         this._waitForCallBack = this._host != null;
         this.Unload();
         this._hostingParameters.ClientBuildManagerParameter.PrecompilationFlags = precompilationFlags | PrecompilationFlags.Clean;
         this.WaitForCallBack();
     }
     try
     {
         this.EnsureHostCreated();
         this._host.PrecompileApp(callback);
     }
     finally
     {
         if (forceCleanBuild)
         {
             this._hostingParameters.ClientBuildManagerParameter.PrecompilationFlags = precompilationFlags;
         }
         if (callback != null)
         {
             RemotingServices.Disconnect(callback);
         }
     }
 }
    internal string[] GetCompiledTypeAndAssemblyName(VirtualPath virtualPath, ClientBuildManagerCallback callback) {

        // Add a pending call to make sure our thread doesn't get killed
        AddPendingCall();

        try {
            // Treat it as relative to the app root
            virtualPath.CombineWithAppRoot();

            Type t = BuildManager.GetCompiledType(virtualPath, callback);

            if (t == null) return null;

            string assemblyPath = Util.GetAssemblyPathFromType(t);
            return new string[] { t.FullName, assemblyPath };
        }
        finally {
            RemovePendingCall();
        }
    }
 public void PrecompileApplication(ClientBuildManagerCallback callback, bool forceCleanBuild)
 {
 }