コード例 #1
0
        private void UpdateFile(IFileUpdater updater)
        {
            for (int i = Items.Count - 1; i >= 0; i--)
            {
                LocationPreviewItem item = (LocationPreviewItem)Items[i];
                if (item.CheckState == __PREVIEWCHANGESITEMCHECKSTATE.PCCS_Checked)
                {
                    // change is applied
                    updater.Replace(item.Line - 1, item.Column - 1, item.Length, Engine.Request.Name);

                    updater.Log(Strings.RefactorPreviewUpdatedLogEntry.FormatUI(Filename, item.Line, item.Column, item.Type == Analysis.VariableType.Definition ? Strings.RefactorPreviewUpdatedLogEntryDefinition : Strings.RefactorPreviewUpdatedLogEntryReference));
                }
            }

            updater.Save();
        }
コード例 #2
0
ファイル: FilePreviewItem.cs プロジェクト: zuokaihuang/PTVS
        private void UpdateFile(IFileUpdater updater)
        {
            for (int i = Items.Count - 1; i >= 0; i--)
            {
                LocationPreviewItem item = (LocationPreviewItem)Items[i];
                if (item.CheckState == __PREVIEWCHANGESITEMCHECKSTATE.PCCS_Checked)
                {
                    // change is applied
                    updater.Replace(item.Line - 1, item.Column - 1, item.Length, Engine.Request.Name);

                    updater.Log(String.Format("{0}({1},{2}): updated {3}", Filename, item.Line, item.Column, item.Type == Analysis.VariableType.Definition ? "definition" : "reference"));
                }
            }

            updater.Save();
        }
コード例 #3
0
ファイル: FilePreviewItem.cs プロジェクト: wenh123/PTVS
        private void UpdateFile(IFileUpdater updater) {
            for (int i = Items.Count - 1; i >= 0; i--) {
                LocationPreviewItem item = (LocationPreviewItem)Items[i];
                if (item.CheckState == __PREVIEWCHANGESITEMCHECKSTATE.PCCS_Checked) {
                    // change is applied
                    updater.Replace(item.Line - 1, item.Column - 1, item.Length, Engine.Request.Name);

                    updater.Log(String.Format("{0}({1},{2}): updated {3}", Filename, item.Line, item.Column, item.Type == Analysis.VariableType.Definition ? "definition" : "reference"));
                }
            }

            updater.Save();
        }