本文整理汇总了C#中IgnoreList类的典型用法代码示例。如果您正苦于以下问题:C# IgnoreList类的具体用法?C# IgnoreList怎么用?C# IgnoreList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IgnoreList类属于命名空间,在下文中一共展示了IgnoreList类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddDefaultIgnorePatterns
public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
{
if (ignoreList == null)
throw new ArgumentNullException("ignoreList");
ignoreList.Ignore("*.intellisense.js");
ignoreList.Ignore("*-vsdoc.js");
}
示例2: AddDefaultIgnorePatterns
public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
{
if (ignoreList == null)
throw new ArgumentNullException("ignoreList");
ignoreList.Ignore("*.intellisense.js");
ignoreList.Ignore("*-vsdoc.js");
ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
}
示例3: ResetIgnorePatterns
public static void ResetIgnorePatterns(IgnoreList ignoreList)
{
ignoreList.Clear();
ignoreList.Ignore("*.intellisense.js");
ignoreList.Ignore("*-vsdoc.js");
ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
//ignoreList.Ignore("*.min.js", OptimizationMode.WhenDisabled);
ignoreList.Ignore("*.min.css", OptimizationMode.WhenDisabled);
}
示例4: AddDefaultIgnorePatterns
private static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
{
if (ignoreList == null)
return;
ignoreList.Ignore("*.intellisense.js");
ignoreList.Ignore("*-vsdoc.js");
ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
}
示例5: AddIgnorePaterns
public static void AddIgnorePaterns(IgnoreList ignoreList)
{
if (ignoreList == null)
{
throw new ArgumentNullException("ignoreList");
}
ignoreList.Ignore("*.min.js", OptimizationMode.WhenEnabled);
}
示例6: AddDefaultIgnorePatterns
private static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
{
if (ignoreList == null)
{
throw new ArgumentNullException("BundleConfig ignore list.");
}
ignoreList.Ignore("*.intellisense.js");
ignoreList.Ignore("*-vsdoc.js");
}
示例7: SetupIgnorePatterns
private static void SetupIgnorePatterns(IgnoreList ignoreList)
{
if (ignoreList == null)
throw new ArgumentNullException("ignoreList");
ignoreList.Clear();
ignoreList.Ignore("*.intellisense.js");
ignoreList.Ignore("*-vsdoc.js");
ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
}
示例8: buttonCustomListLoad_Click
private void buttonCustomListLoad_Click(object sender, EventArgs e)
{
OpenFileDialog dialog = new OpenFileDialog();
dialog.Title = "Eagle - Open custom list...";
dialog.Filter = "Eagle Custom List | *.ecl";
DialogResult result = dialog.ShowDialog(this);
if (result != DialogResult.OK) return;
IgnoreList list = new IgnoreList(dialog.FileName);
string listName = list.Name;
ListViewItem item = new ListViewItem(list.Name);
item.SubItems.Add(list.Path);
listView1.Items.Add(item);
}
示例9: buttonCustomListNew_Click
private void buttonCustomListNew_Click(object sender, EventArgs e)
{
// Get name of destination file
SaveFileDialog dialog = new SaveFileDialog();
dialog.Title = "Eagle - Save new custom list as...";
dialog.Filter = "Eagle Custom List | *.ecl";
var result = dialog.ShowDialog(this);
if (result != DialogResult.OK) return;
string filePath = dialog.FileName;
string fileName = Path.GetFileNameWithoutExtension(filePath);
// List existing list names
var existingListNames = new List<string>();
foreach (ListViewItem item in listView1.Items)
{
existingListNames.Add(item.Text);
}
// Create unique list name
int counter = 1;
string suffix = "";
while (existingListNames.Contains(fileName + suffix))
{
suffix = String.Format(" ({0})", counter++);
}
string newListName = fileName + suffix;
// Create actual IgnoreList
IgnoreList list = new IgnoreList();
list.Name = newListName;
list.SaveAs(filePath);
// Update list view
ListViewItem newItem = new ListViewItem(newListName);
newItem.SubItems.Add(filePath);
listView1.Items.Add(newItem);
dialog.Dispose();
}
示例10: AddDefaultIgnorePatterns
public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
{
if(ignoreList == null) {
throw new ArgumentNullException("ignoreList");
}
}
示例11: AddDefaultIgnorePatterns
public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
{
ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
ignoreList.Ignore("*.debug.css", OptimizationMode.WhenDisabled);
}
示例12: backgroundWorker_DoWork
/*-----------------------------------------------------------------------------------------*/
/* Background worker */
/*-----------------------------------------------------------------------------------------*/
private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;
OxmlDocument doc = new OxmlDocument(this.GetOXML());
Scope scope = new Scope(Properties.Settings.Default.ScopeSize);
scope.MinimumTokenLength = Properties.Settings.Default.MinimumTokenLength;
doc.PurgeShading();
doc.PurgeBookmarks();
// Load ignore list
if (!String.IsNullOrEmpty(_ignoreListName))
{
IgnoreList IgnoreList = new IgnoreList(GetListPath(_ignoreListName));
scope.IgnoreWords(IgnoreList.LoadWords(_language));
}
// Analyse document
int blockCount = 0;
float numberOfBlocks = (float)doc.GetNumberOfBlocks();
var block = doc.GetNextOxmlBlock();
while (block != null)
{
var tokens = block.GenerateOxmlTokens();
foreach (var token in tokens)
{
scope.FeedToken(token);
}
block = doc.GetNextOxmlBlock();
if (worker.CancellationPending == true)
{
e.Cancel = true;
break;
}
int progress = (int)(++blockCount / numberOfBlocks * 100);
worker.ReportProgress(progress);
}
// Add bookmarks to document
var conflicts = scope.GetConflicts();
foreach (var root in conflicts.Keys)
{
foreach (var conflict in conflicts[root])
{
foreach (var token in conflict)
{
Debug.WriteLine(String.Format("Adding bookmark {0} for root '{1}' with text '{2}' and range {3}",
token.BookmarkName, token.Root, token.Text, token.Range.ToString()));
doc.BookmarkRange(token.Range, token.BookmarkName);
}
}
}
// Update OXML only if it is valid
string oxml = doc.ToOxml();
if (oxml != null)
{
this._conflicts = conflicts;
this.SetOXML(doc.ToOxml());
}
else
{
MessageBox.Show("An error occured while processing this document.", "Eagle Add-In");
}
}
示例13: IgnoreListNameChanged
internal void IgnoreListNameChanged(string filePath, string newName)
{
IgnoreList ignoreList = new IgnoreList(filePath);
ignoreList.Name = newName;
ignoreList.Save();
}