本文整理汇总了C#中IExtensionHost.GetExtensionPoint方法的典型用法代码示例。如果您正苦于以下问题:C# IExtensionHost.GetExtensionPoint方法的具体用法?C# IExtensionHost.GetExtensionPoint怎么用?C# IExtensionHost.GetExtensionPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IExtensionHost
的用法示例。
在下文中一共展示了IExtensionHost.GetExtensionPoint方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Install
public bool Install(IExtensionHost host)
{
var suiteBuildersExtensionPoint = host.GetExtensionPoint("SuiteBuilders");
if (suiteBuildersExtensionPoint == null)
return false;
suiteBuildersExtensionPoint.Install(new BDDSuiteBuilder(new ReflectionProvider()));
var testCaseBuildersExtensionPoint = host.GetExtensionPoint("TestCaseBuilders");
if (testCaseBuildersExtensionPoint == null)
return false;
testCaseBuildersExtensionPoint.Install(new BDDTestCaseBuilder(new ReflectionProvider(), new TestDescriber(new TestDescriptionWriter(), new TypeManager())));
return true;
}
示例2: Install
/// <summary>
/// When called, the add-in installs itself into
/// the host, if possible. Because NUnit uses separate
/// hosts for the client and test domain environments,
/// an add-in may be invited to istall itself more than
/// once. The add-in is responsible for checking which
/// extension points are supported by the host that is
/// passed to it and taking the appropriate action.
/// </summary>
/// <param name="host">The host in which to install the add-in</param>
/// <returns>True if the add-in was installed, otehrwise false</returns>
public bool Install(IExtensionHost host)
{
var decorators = host.GetExtensionPoint("TestDecorators");
if (decorators == null)
return false;
decorators.Install(new TestDecorator());
var providers = host.GetExtensionPoint("TestCaseProviders");
if (providers == null)
return false;
providers.Install(new Builders.AutoDataProvider());
return true;
}
示例3: Install
public bool Install(IExtensionHost host)
{
IExtensionPoint extensionPoint = host.GetExtensionPoint("SuiteBuilders");
if (extensionPoint == null) return false;
extensionPoint.Install(this);
return true;
}
示例4: Install
public bool Install(IExtensionHost host)
{
//Debugger.Break();
if (host == null)
throw new ArgumentNullException("host");
IExtensionPoint listeners = host.GetExtensionPoint("EventListeners");
if (listeners == null)
return false;
listeners.Install(this);
// NiceToHave: inject configuration from configuration file
var processName = Process.GetCurrentProcess().ProcessName;
var perfCounterBuilders = new[]
{
new PerfCounterBuilder("Process", "Private Bytes", processName),
new PerfCounterBuilder("Process", "Virtual Bytes", processName),
new PerfCounterBuilder("Process", "Handle Count", processName),
new PerfCounterBuilder("Process", "Thread Count", processName),
new PerfCounterBuilder(".NET CLR Memory", "# Bytes in all Heaps", processName),
new PerfCounterBuilder(".NET CLR Loading", "Current appdomains", processName)
};
mPerfCollector = new PerfCollector(new CsvPerfLogger(@"c:\PerfLogs", @"nunit.csv", perfCounterBuilders), perfCounterBuilders);
return true;
}
示例5:
bool IAddin.Install(IExtensionHost host)
{
var suiteBuilders = host.GetExtensionPoint("SuiteBuilders");
if (suiteBuilders == null)
return false;
suiteBuilders.Install(this);
return true;
}
示例6: Install
public bool Install(IExtensionHost host)
{
// Debugger.Launch();
// var nunitVersion = typeof(IExtensionHost).Assembly.GetName().Version;
var eventListeners = host.GetExtensionPoint("EventListeners");
eventListeners.Install(new TeamCityEventListener());
return true;
}
示例7: Install
public bool Install(IExtensionHost host)
{
var builders = host.GetExtensionPoint("SuiteBuilders");
if (builders == null) return false;
builders.Install(this);
return true;
}
示例8: Install
public bool Install(IExtensionHost host)
{
var testCaseBuilders = host.GetExtensionPoint("SuiteBuilders");
testCaseBuilders.Install(this);
return true;
}
示例9: Install
public bool Install(IExtensionHost host)
{
var listeners = host.GetExtensionPoint("EventListeners");
listeners.Install(this);
return true;
}
示例10: Install
public bool Install(IExtensionHost host)
{
IExtensionPoint builders = host.GetExtensionPoint( "SuiteBuilders" );
if ( builders == null )
return false;
builders.Install( new SampleSuiteExtensionBuilder() );
return true;
}
示例11: Install
public bool Install(IExtensionHost host)
{
Console.WriteLine("install called");
IExtensionPoint builders = host.GetExtensionPoint("SuiteBuilders");
if (builders == null)
return false;
builders.Install(this);
return true;
}
示例12: Install
public bool Install(IExtensionHost host)
{
IExtensionPoint testCaseBuilders = host.GetExtensionPoint("EventListeners");
if (testCaseBuilders == null)
return false;
testCaseBuilders.Install(this); //this implments both interfaces
return true;
}
示例13: Install
public bool Install(IExtensionHost host)
{
IExtensionPoint decorators = host.GetExtensionPoint("TestDecorators");
if (decorators == null)
return false;
decorators.Install(this);
return true;
}
示例14: Install
public bool Install(IExtensionHost host)
{
System.Diagnostics.Trace.WriteLine( "MaxTimeDecorator: Install called" );
IExtensionPoint decorators = host.GetExtensionPoint( "TestDecorators" );
if ( decorators == null ) return false;
decorators.Install( this );
return true;
}
示例15: Install
public bool Install(IExtensionHost host)
{
IExtensionPoint listeners = host.GetExtensionPoint( "EventListeners" );
if ( listeners == null )
return false;
listeners.Install( this );
return true;
}