private void SyncProject(MonoIsland island, string otherAssetsProjectPart)
 {
     SolutionSynchronizer.SyncFileIfNotChanged(this.ProjectFile(island), this.ProjectText(island, SolutionSynchronizer.ModeForCurrentExternalEditor(), otherAssetsProjectPart));
 }
 private void SyncSolution(IEnumerable <MonoIsland> islands)
 {
     SolutionSynchronizer.SyncFileIfNotChanged(this.SolutionFile(), this.SolutionText(islands, SolutionSynchronizer.ModeForCurrentExternalEditor()));
 }
 public void Sync()
 {
     this.SetupProjectSupportedExtensions();
     if (!AssetPostprocessingInternal.OnPreGeneratingCSProjectFiles())
     {
         IEnumerable <MonoIsland> islands = from i in InternalEditorUtility.GetMonoIslands()
                                            where 0 < i._files.Length
                                            select i;
         string otherAssetsProjectPart = this.GenerateAllAssetProjectPart();
         this.SyncSolution(islands);
         foreach (MonoIsland current in SolutionSynchronizer.RelevantIslandsForMode(islands, SolutionSynchronizer.ModeForCurrentExternalEditor()))
         {
             this.SyncProject(current, otherAssetsProjectPart);
         }
     }
     AssetPostprocessingInternal.CallOnGeneratedCSProjectFiles();
 }
示例#4
0
 private void SyncProject(MonoIsland island, Dictionary <string, string> allAssetsProjectParts, string[] additionalDefines, List <MonoIsland> allProjectIslands)
 {
     SolutionSynchronizer.SyncFileIfNotChanged(this.ProjectFile(island), this.ProjectText(island, SolutionSynchronizer.ModeForCurrentExternalEditor(), allAssetsProjectParts, additionalDefines, allProjectIslands));
 }
示例#5
0
 public void Sync()
 {
     this.SetupProjectSupportedExtensions();
     if (!AssetPostprocessingInternal.OnPreGeneratingCSProjectFiles())
     {
         ScriptEditorUtility.ScriptEditor scriptEditorFromPreferences = ScriptEditorUtility.GetScriptEditorFromPreferences();
         if (scriptEditorFromPreferences == ScriptEditorUtility.ScriptEditor.SystemDefault || scriptEditorFromPreferences == ScriptEditorUtility.ScriptEditor.Other)
         {
             return;
         }
         IEnumerable <MonoIsland> islands = from i in EditorCompilationInterface.GetAllMonoIslands()
                                            where 0 < i._files.Length && i._files.Any((string f) => this.ShouldFileBePartOfSolution(f))
                                            select i;
         Dictionary <string, string> allAssetsProjectParts = this.GenerateAllAssetProjectParts();
         string[] responseFileDefinesFromFile = ScriptCompilerBase.GetResponseFileDefinesFromFile(MonoCSharpCompiler.ReponseFilename);
         this.SyncSolution(islands);
         List <MonoIsland> list = SolutionSynchronizer.RelevantIslandsForMode(islands, SolutionSynchronizer.ModeForCurrentExternalEditor()).ToList <MonoIsland>();
         foreach (MonoIsland current in list)
         {
             this.SyncProject(current, allAssetsProjectParts, responseFileDefinesFromFile, list);
         }
         if (scriptEditorFromPreferences == ScriptEditorUtility.ScriptEditor.VisualStudioCode)
         {
             this.WriteVSCodeSettingsFiles();
         }
     }
     AssetPostprocessingInternal.CallOnGeneratedCSProjectFiles();
 }
示例#6
0
 public void Sync()
 {
     this.SetupProjectSupportedExtensions();
     if (!AssetPostprocessingInternal.OnPreGeneratingCSProjectFiles())
     {
         IEnumerable <MonoIsland> islands = from i in InternalEditorUtility.GetMonoIslands()
                                            where 0 < i._files.Length
                                            select i;
         string   otherAssetsProjectPart      = this.GenerateAllAssetProjectPart();
         string[] responseFileDefinesFromFile = ScriptCompilerBase.GetResponseFileDefinesFromFile(MonoCSharpCompiler.ReponseFilename);
         this.SyncSolution(islands);
         foreach (MonoIsland current in SolutionSynchronizer.RelevantIslandsForMode(islands, SolutionSynchronizer.ModeForCurrentExternalEditor()))
         {
             this.SyncProject(current, otherAssetsProjectPart, responseFileDefinesFromFile);
         }
         if (ScriptEditorUtility.GetScriptEditorFromPreferences() == ScriptEditorUtility.ScriptEditor.VisualStudioCode)
         {
             this.WriteVSCodeSettingsFiles();
         }
     }
     AssetPostprocessingInternal.CallOnGeneratedCSProjectFiles();
 }
        public void Sync()
        {
            this.SetupProjectSupportedExtensions();
            if (AssetPostprocessingInternal.OnPreGeneratingCSProjectFiles())
            {
                return;
            }
            IEnumerable <MonoIsland> islands = ((IEnumerable <MonoIsland>)InternalEditorUtility.GetMonoIslands()).Where <MonoIsland>((Func <MonoIsland, bool>)(i => 0 < i._files.Length));
            string assetProjectPart          = this.GenerateAllAssetProjectPart();

            this.SyncSolution(islands);
            foreach (MonoIsland island in SolutionSynchronizer.RelevantIslandsForMode(islands, SolutionSynchronizer.ModeForCurrentExternalEditor()))
            {
                this.SyncProject(island, assetProjectPart);
            }
            AssetPostprocessingInternal.CallOnGeneratedCSProjectFiles();
        }