本文整理汇总了C#中IImporter类的典型用法代码示例。如果您正苦于以下问题:C# IImporter类的具体用法?C# IImporter怎么用?C# IImporter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IImporter类属于命名空间,在下文中一共展示了IImporter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Add
public void Add(IImporter importer)
{
if (importer == null)
throw new ArgumentNullException("importer");
base.Add(importer);
}
开发者ID:liuxing7954,项目名称:cangku_1,代码行数:7,代码来源:ImporterCollection.cs
示例2: Parser
public Parser(int optimization, IStylizer stylizer, IImporter importer, bool debug = false)
{
Stylizer = stylizer;
Importer = importer;
Debug = debug;
Tokenizer = new Tokenizer(optimization);
}
开发者ID:jamesfoster,项目名称:dotless,代码行数:7,代码来源:Parser.cs
示例3: Url
public Url(Node value, IImporter importer)
{
Importer = importer;
ImportPaths = importer.GetCurrentPathsClone();
Value = value;
}
开发者ID:heinrichbreedt,项目名称:dotless,代码行数:7,代码来源:Url.cs
示例4: Put
public void Put(IImporter importer)
{
if (importer == null)
throw new ArgumentNullException("importer");
Remove(importer.OutputType);
Add(importer);
}
开发者ID:liuxing7954,项目名称:cangku_1,代码行数:8,代码来源:ImporterCollection.cs
示例5: Initialize
public void Initialize(
IVhptUserControlFactory vhptUserControlFactory,
IEnumerable<VhptIdentification> vhpts,
IImporter importer)
{
this.InitializeJokeImport(importer);
this.InitializeVhpts(vhpts, vhptUserControlFactory);
}
开发者ID:bbvcommon,项目名称:Multi-Threading-Sample,代码行数:8,代码来源:MainForm.cs
示例6: ImportContent
public object ImportContent(Stream stream, string fileExt, IImporter importer = null)
{
if (importer == null)
{
importer = GetDefaultImporter(fileExt);
}
return importer.Import(stream);
}
开发者ID:TheFlyingFiddle,项目名称:Project-Monocle,代码行数:9,代码来源:IResourceLoader.cs
示例7: Plugin
public Plugin(IXmlReader xmlReader, IImporter importer, IExporter exporter)
{
_xmlReader = xmlReader;
_importer = importer;
_exporter = exporter;
Name = "ISO Plugin";
Version = "0.1.1";
Owner = "AgGateway & Contributors";
}
开发者ID:ADAPT,项目名称:ISOv4Plugin,代码行数:9,代码来源:Plugin.cs
示例8: GetImportAction
private ImportAction GetImportAction(IImporter importer)
{
if (!_importAction.HasValue)
{
_importAction = importer.Import(this);
}
return _importAction.Value;
}
开发者ID:Ralphvanderneut,项目名称:dotless,代码行数:9,代码来源:Import.cs
示例9: Import
private Import(string path, IImporter importer, Value features)
{
if (path == null)
throw new ParserException("Imports do not allow expressions");
Importer = importer;
Path = path;
Features = features;
ImportAction = Importer.Import(this); // it is assumed to be css if it cannot be found as less
}
开发者ID:jamesfoster,项目名称:dotless,代码行数:11,代码来源:Import.cs
示例10: Url
public Url(Node value, IImporter importer)
{
if (value is TextNode)
{
var textValue = value as TextNode;
if (!Regex.IsMatch(textValue.Value, @"^(([a-zA-Z]+:)|(\/))") && importer.Paths.Any())
{
textValue.Value = importer.Paths.Concat(new[] { textValue.Value }).AggregatePaths(importer.CurrentDirectory);
}
}
Value = value;
}
开发者ID:ryansroberts,项目名称:cassette,代码行数:13,代码来源:Url.cs
示例11: Url
public Url(Node value, IImporter importer)
{
if (value is TextNode)
{
var textValue = value as TextNode;
if (!Regex.IsMatch(textValue.Value, @"^(([a-zA-Z]+:)|(\/))"))
{
textValue.Value = importer.AlterUrl(textValue.Value);
}
}
Value = value;
}
开发者ID:WouterBos,项目名称:dotless,代码行数:13,代码来源:Url.cs
示例12: Import
private Import(string path, IImporter importer)
{
Importer = importer;
Path = path;
if (path.EndsWith(".css"))
{
Css = true;
} else
{
Css = !Importer.Import(this); // it is assumed to be css if it cannot be found as less
if (Css && path.EndsWith(".less"))
{
throw new ParsingException("Cannot find less file", Index);
}
}
}
开发者ID:ryansroberts,项目名称:cassette,代码行数:18,代码来源:Import.cs
示例13: Import
private Import(string path, IImporter importer, Value features)
{
Importer = importer;
Path = path;
Features = features;
if (path.EndsWith(".css"))
{
Css = true;
} else
{
Css = !Importer.Import(this); // it is assumed to be css if it cannot be found as less
if (Css && path.EndsWith(".less"))
{
throw new FileNotFoundException("You are importing a file ending in .less that cannot be found.", path);
}
}
}
开发者ID:Sarkie,项目名称:dotless,代码行数:19,代码来源:Import.cs
示例14: select_SelectedIndexChanged
void select_SelectedIndexChanged(object sender, EventArgs e) {
ImporterItem item = (select.SelectedItem as ImporterItem);
if (item != null) {
if (importer != null) {
UnwireImporterEvents();
importer.Dispose();
}
IImporterUI<IBilingualDictionary> newUI = null;
if (item.Type.GetInterfaces().Contains(typeof(IDictionarySectionImporter))) {
var si = (IDictionarySectionImporter)item.Type.GetConstructor(new Type[] { }).Invoke(new object[] { });
var dsi = new DualSectionImporter();
newUI = new Controls.DictionarySectionUI(dsi, si);
importer = dsi;
} else if(item.Type.IsSubclassOf(typeof(IBilingualDictionary))) {
importer = (IImporter<IBilingualDictionary>)item.Type.GetConstructor(new Type[] { }).Invoke(new object[] { });
foreach (Type t in importer.GetType().Assembly.GetTypes()) {
var attr = Attribute.GetCustomAttribute(t, typeof(ImporterUIAttribute)) as ImporterUIAttribute;
if (attr != null) {
newUI = (IImporterUI<IBilingualDictionary>)Activator.CreateInstance(t, importer);
break;
}
}
}
WireImporterEvents();
if (newUI == null) {
CurrentUI = new Controls.ErrorUI("No UI for " + item.Name, "");
UnwireImporterEvents();
importer.Dispose();
importer = null;
return;
}
newUI.Finished += this.ImporterUIFinished;
CurrentUI = (Control)newUI;
}
}
开发者ID:dbremner,项目名称:szotar,代码行数:41,代码来源:DictionaryImport.cs
示例15: Parser
public Parser(int optimization, IStylizer stylizer, IImporter importer)
: this(optimization, stylizer, importer, defaultDebug)
{
}
开发者ID:Ralphvanderneut,项目名称:dotless,代码行数:4,代码来源:Parser.cs
示例16: Url
public Url Url(Node value, IImporter importer, NodeLocation location)
{
return new Url(value, importer) { Location = location };
}
开发者ID:Rungee,项目名称:MapSurfer.NET-CartoCSS,代码行数:4,代码来源:CartoNodeProvider.cs
示例17: Import
public Import Import(Quoted path, IImporter importer, int index)
{
return new Import(path, importer) { Index = index };
}
开发者ID:nlerikheemskerk,项目名称:cassette,代码行数:4,代码来源:DefaultNodeProvider.cs
示例18: Import
public Import Import(Quoted path, IImporter importer, Value features, bool isOnce, NodeLocation location)
{
return new Import(path, importer, features, isOnce) { Location = location };
}
开发者ID:radleta,项目名称:dotless,代码行数:4,代码来源:DefaultNodeProvider.cs
示例19: Form1
/// <summary>
/// This is constructor of Form1 instance.
/// </summary>
/// <param name="exporter"></param>
/// <param name="importer"></param>
public Form1(IExporter exporter, IImporter importer)
{
InitializeComponent();
this.exporter = exporter;
this.importer = importer;
}
开发者ID:Geiko,项目名称:WinForms,代码行数:11,代码来源:Form1.cs
示例20: Import
private bool Import(IImporter importer, object ownerViewModel, string fileName, Action<object, Stream> importAction)
{
object importSettingsViewModel;
if (GetImportSettings(ownerViewModel, importer, out importSettingsViewModel))
{
_busyService.ShowBusyIndicatorUntilFinishDrawing();
try
{
using (var stream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete))
importAction(importSettingsViewModel, stream);
return true;
}
catch (IOException ioe)
{
_dialogService.ShowError(ownerViewModel, string.Format("Error importing file:\n{0}", ioe.Message), "Cog");
}
catch (ImportException ie)
{
_dialogService.ShowError(ownerViewModel, string.Format("Error importing file:\n{0}", ie.Message), "Cog");
}
}
return false;
}
开发者ID:rmunn,项目名称:cog,代码行数:23,代码来源:ImportService.cs
注:本文中的IImporter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论