本文整理汇总了C#中ComponentLogger类的典型用法代码示例。如果您正苦于以下问题:C# ComponentLogger类的具体用法?C# ComponentLogger怎么用?C# ComponentLogger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ComponentLogger类属于命名空间,在下文中一共展示了ComponentLogger类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SummaryStatistics
public SummaryStatistics(string metricName, string metricDescription, IMetricComputation baseMetricComputation, ComponentLogger logger)
{
m_metricComputation = baseMetricComputation;
m_metricName = metricName;
m_metricDescription = metricDescription;
m_logger = logger;
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:7,代码来源:SummaryStatistics.cs
示例2: BuildCodeSource
/// <summary>
/// Builds the code source.
/// Depending on metadata type final class will implement different interfaces and thus will have different class body.
/// 1. metadata is a DecisionMetadata - the final source class is going to implement IDecisionModule interface,
/// 2. metadata is a LoopScopeMetadata - the final source class is going to implement ILoopDecisionModule interface
/// </summary>
/// <param name="metadata">The metadata.</param>
/// <param name="typeDirectories">The type directories.</param>
/// <param name="successorNodeLabelIdLookup">The successor node label id lookup.</param>
/// <param name="predeccessorsOutputsNameTypeLookup">The predeccessors outputs name type lookup.</param>
/// <param name="logger">The logger.</param>
/// <param name="assembliesReferenceLocations">Output the list of assemblies locations that must be reference by DecisionCompilator</param>
/// <returns></returns>
public static string BuildCodeSource(IDecision metadata, List<string> typeDirectories, Dictionary<string, string> successorNodeLabelIdLookup,
Dictionary<string, string> predeccessorsOutputsNameTypeLookup, ComponentLogger logger, out HashSet<string> assembliesReferenceLocations)
{
string bodyCode, moduleInterface;
if (metadata is DecisionMetadata)
{
//parse the code written by user
DecisionCodeParser codeParser = new DecisionCodeParser(metadata.DecisionCode, successorNodeLabelIdLookup, predeccessorsOutputsNameTypeLookup);
string userDecisionCodeSnippet = codeParser.ParseCode();
bodyCode = String.Format(DECISION_MODULE_BODY, userDecisionCodeSnippet);
moduleInterface = typeof(IDecisionModule).FullName;
}
else
{
//append ';' to the end just in case so that user condition can be simplified
string decisionCode = (metadata.DecisionCode.EndsWith(";")) ? metadata.DecisionCode : metadata.DecisionCode + ";";
DecisionCodeParser codeParser = new DecisionCodeParser(decisionCode, successorNodeLabelIdLookup, predeccessorsOutputsNameTypeLookup);
string userDecisionCodeSnippet = codeParser.ParseCode();
bodyCode = String.Format(LOOP_DECISION_MODULE_BODY, userDecisionCodeSnippet);
moduleInterface = typeof(ILoopDecisionModule).FullName;
}
//build the string of all usings of all namespace found in types assemblies
string usingsNamespacesCodeSnippet = ReferenceTypesAssemblies(typeDirectories, logger, out assembliesReferenceLocations);
return BuildDecisionCodeSource(metadata.Classname, moduleInterface, bodyCode, usingsNamespacesCodeSnippet);
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:42,代码来源:DecisionCodeBuilder.cs
示例3: BuildDictionary
private static TLDictionaryIndex BuildDictionary(TLArtifactsCollection listOfArtifacts, ComponentLogger logger)
{
if (listOfArtifacts == null)
{
throw new ComponentException("Received null listOfArtifacts");
}
TLDictionaryIndex dict = TFIDFIndexBuilder.build(listOfArtifacts, logger);
return dict;
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:11,代码来源:TFIDFDictionaryIndexBuilderComponent.cs
示例4: DestroyLogger
/// <summary>
/// Destroys the logger.
/// </summary>
/// <param name="logger">The logger.</param>
internal static void DestroyLogger(ComponentLogger logger)
{
ComponentLoggerImplementation loggerImpl = logger as ComponentLoggerImplementation;
if (loggerImpl != null)
{
NLog.Config.LoggingRule loggingRule = TryFindRule(loggerImpl.Name);
lock (lockLoggingRules)
{
NLog.LogManager.Configuration.LoggingRules.Remove(loggingRule);
}
}
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:17,代码来源:LoggerFactory.cs
示例5: Load
/// <summary>
/// Loads the component based on the provided component metadata.
/// </summary>
/// <param name="logger">The logger - logger provided for the component.</param>
public void Load(ComponentLogger logger)
{
if (LoadedComponent == null)
{
Assembly tlcompAssembly = Assembly.LoadFrom(m_metadata.ComponentMetadataDefinition.Assembly);
Type myLoadClass = tlcompAssembly.GetType(m_metadata.ComponentMetadataDefinition.Classname); // LoadClass is my class
if (myLoadClass == null)
{
throw new ComponentsLibraryException("Component class " + m_metadata.ComponentMetadataDefinition.Classname + " could not be loaded.");
}
LoadedComponent = (IComponent)Activator.CreateInstance(myLoadClass, new Object[] { logger });
//create workspace wrapper for the component
IWorkspace workspaceWrapper = WorkspaceWrapperFactory.CreateWorkspaceWrapper(m_metadata, m_workspace);
LoadedComponent.Workspace = workspaceWrapper;
SetConfiguration();
}
}
开发者ID:CoEST,项目名称:TraceLab,代码行数:25,代码来源:ComponentLoader.cs
示例6: SimpleResultsGUI
public SimpleResultsGUI(ComponentLogger log)
: base(log)
{
_config = new SimpleResultsGUIConfig();
Configuration = _config;
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:6,代码来源:SimpleResultsGUI.cs
示例7: JSDComponent
public JSDComponent(ComponentLogger log)
: base(log)
{
}
开发者ID:CoEST,项目名称:TraceLab-CDK,代码行数:4,代码来源:JSDComponent.cs
示例8: MatricesCollector
public MatricesCollector(ComponentLogger log) : base(log) { }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:1,代码来源:MatricesCollector.cs
示例9: DatasetConverter
public DatasetConverter(ComponentLogger log) : base(log)
{
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:4,代码来源:DatasetConverter.cs
示例10: Incrementer
public Incrementer(ComponentLogger log)
: base(log)
{
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:4,代码来源:IncrementerComponent.cs
示例11: OracleImporter
public OracleImporter(ComponentLogger log, OracleImporterConfig config)
: base(log)
{
_config = config;
Configuration = _config;
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:6,代码来源:OracleImporter.cs
示例12: LinkExtractorMatrixComponent
public LinkExtractorMatrixComponent(ComponentLogger log)
: base(log)
{
}
开发者ID:CoEST,项目名称:TraceLab-CDK,代码行数:4,代码来源:LinkExtractorMatrixComponent.cs
示例13: SemeruSplitterComponent
public SemeruSplitterComponent(ComponentLogger log)
: base(log)
{
_config = new SemeruSplitterComponentConfig();
Configuration = _config;
}
开发者ID:CoEST,项目名称:TraceLab-CDK,代码行数:6,代码来源:SemeruSplitterComponent.cs
示例14: PageRankComponent
public PageRankComponent(ComponentLogger log)
: base(log)
{
_config = new PageRankConfig();
Configuration = _config;
}
开发者ID:CoEST,项目名称:TraceLab-CDK,代码行数:6,代码来源:PageRankComponent.cs
示例15: EffectivenessMetricsComponent
public EffectivenessMetricsComponent(ComponentLogger log)
: base(log)
{
_config = new EffectivenessMetricsConfig();
Configuration = _config;
}
开发者ID:CoEST,项目名称:TraceLab-CDK,代码行数:6,代码来源:EffectivenessMetricsComponent.cs
示例16: CorpusImporter
public CorpusImporter(ComponentLogger log, CorpusImporterConfig config)
: base(log)
{
_config = config;
Configuration = _config;
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:6,代码来源:CorpusImporter.cs
示例17: StringWriter
public StringWriter(ComponentLogger log)
: base(log)
{
config = new StringWriterConfig();
Configuration = config;
}
开发者ID:CoEST,项目名称:TraceLab-CDK,代码行数:6,代码来源:StringWriter.cs
示例18: DocumentVectorComponent
public DocumentVectorComponent(ComponentLogger log) : base(log)
{
_config = new DocumentVectorConfig();
Configuration = _config;
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:5,代码来源:DocumentVectorComponent.cs
示例19: LambdaCalculationComponent
public LambdaCalculationComponent(ComponentLogger log)
: base(log)
{
}
开发者ID:CoEST,项目名称:TraceLab-CDK,代码行数:4,代码来源:LambdaCalculationComponent.cs
示例20: TestEmptyComponent
public TestEmptyComponent(ComponentLogger log)
: base(log)
{
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:4,代码来源:TestEmptyComponent.cs
注:本文中的ComponentLogger类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论