Esempio n. 1
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();
 }
        private string SolutionText(IEnumerable <MonoIsland> islands, SolutionSynchronizer.Mode mode)
        {
            string str1 = "11.00";

            if (this._settings.VisualStudioVersion == 9)
            {
                str1 = "10.00";
            }
            IEnumerable <MonoIsland> monoIslands = SolutionSynchronizer.RelevantIslandsForMode(islands, mode);
            string projectEntries = this.GetProjectEntries(monoIslands);
            string str2           = string.Join(SolutionSynchronizer.WindowsNewline, monoIslands.Select <MonoIsland, string>((Func <MonoIsland, string>)(i => this.GetProjectActiveConfigurations(this.ProjectGuid(i._output)))).ToArray <string>());

            return(string.Format(this._settings.SolutionTemplate, (object)str1, (object)projectEntries, (object)str2, (object)this.ReadExistingMonoDevelopSolutionProperties()));
        }
 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();
 }
        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();
        }
        private string SolutionText(IEnumerable <MonoIsland> islands, SolutionSynchronizer.Mode mode)
        {
            string text = "11.00";

            if (this._settings.VisualStudioVersion == 9)
            {
                text = "10.00";
            }
            IEnumerable <MonoIsland> enumerable = SolutionSynchronizer.RelevantIslandsForMode(islands, mode);
            string projectEntries = this.GetProjectEntries(enumerable);
            string text2          = string.Join(SolutionSynchronizer.WindowsNewline, (from i in enumerable
                                                                                      select this.GetProjectActiveConfigurations(this.ProjectGuid(i._output))).ToArray <string>());

            return(string.Format(this._settings.SolutionTemplate, new object[]
            {
                text,
                projectEntries,
                text2,
                this.ReadExistingMonoDevelopSolutionProperties()
            }));
        }
Esempio n. 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();
 }