本文整理汇总了C#中ProjectModelElementEnvoy类的典型用法代码示例。如果您正苦于以下问题:C# ProjectModelElementEnvoy类的具体用法?C# ProjectModelElementEnvoy怎么用?C# ProjectModelElementEnvoy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProjectModelElementEnvoy类属于命名空间,在下文中一共展示了ProjectModelElementEnvoy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: JasmineElement
protected JasmineElement(KarmaServiceProvider provider, string name,
ProjectModelElementEnvoy projectFileEnvoy,
TextRange textRange, IList<string> referencedFiles)
: base(provider, name, projectFileEnvoy, textRange)
{
_referencedFiles = referencedFiles ?? new List<string>().AsReadOnly();
}
示例2: Element
protected Element(IUnitTestProvider provider,
UnitTestElement parent,
ProjectModelElementEnvoy projectEnvoy,
string declaringTypeName,
bool isIgnored)
: base(provider, parent)
{
if (projectEnvoy == null && !Shell.Instance.IsTestShell)
{
throw new ArgumentNullException("projectEnvoy");
}
if (declaringTypeName == null)
{
throw new ArgumentNullException("declaringTypeName");
}
_projectEnvoy = projectEnvoy;
_declaringTypeName = declaringTypeName;
if (isIgnored)
{
SetExplicit("Ignored");
}
}
示例3: GetOrCreateContextElement
public static ContextElement GetOrCreateContextElement(MSpecUnitTestProvider provider,
IProject project,
ProjectModelElementEnvoy projectEnvoy,
string typeName,
string assemblyLocation,
string subject,
ICollection<string> tags,
bool isIgnored)
{
#if RESHARPER_6
var id = ContextElement.CreateId(subject, typeName);
var contextElement = provider.UnitTestManager.GetElementById(project, id) as ContextElement;
if (contextElement != null)
{
contextElement.State = UnitTestElementState.Valid;
return contextElement;
}
#endif
return new ContextElement(provider,
projectEnvoy,
typeName,
assemblyLocation,
subject,
tags,
isIgnored);
}
示例4: AssemblyExplorer
public AssemblyExplorer(MSpecUnitTestProvider provider,
#if RESHARPER_61
IUnitTestElementManager manager,
PsiModuleManager psiModuleManager,
CacheManager cacheManager,
#endif
IMetadataAssembly assembly,
IProject project,
UnitTestElementConsumer consumer)
{
_assembly = assembly;
_consumer = consumer;
using (ReadLockCookie.Create())
{
var projectEnvoy = new ProjectModelElementEnvoy(project);
var cache = new ContextCache();
#if RESHARPER_61
_contextFactory = new ContextFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy, _assembly.Location.FullPath, cache);
_contextSpecificationFactory = new ContextSpecificationFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy, cache);
_behaviorFactory = new BehaviorFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy, cache);
_behaviorSpecificationFactory = new BehaviorSpecificationFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy);
#else
#if RESHARPER_6
_contextFactory = new ContextFactory(provider, project, projectEnvoy, _assembly.Location.FullPath, cache);
#else
_contextFactory = new ContextFactory(provider, project, projectEnvoy, _assembly.Location, cache);
#endif
_contextSpecificationFactory = new ContextSpecificationFactory(provider, project, projectEnvoy, cache);
_behaviorFactory = new BehaviorFactory(provider, project, projectEnvoy, cache);
_behaviorSpecificationFactory = new BehaviorSpecificationFactory(provider, project, projectEnvoy);
#endif
}
}
示例5: ContextFactory
public ContextFactory(IUnitTestProvider provider, ProjectModelElementEnvoy projectEnvoy, string assemblyPath, ContextCache cache)
{
_provider = provider;
_cache = cache;
_projectEnvoy = projectEnvoy;
_assemblyPath = assemblyPath;
}
示例6: GetOrCreateContextSpecification
public static ContextSpecificationElement GetOrCreateContextSpecification(MSpecUnitTestProvider provider,
IProject project,
ContextElement context,
ProjectModelElementEnvoy projectEnvoy,
string declaringTypeName,
string fieldName,
ICollection<string> tags,
bool isIgnored)
{
#if RESHARPER_6
var id = ContextSpecificationElement.CreateId(context, fieldName);
var contextSpecification = provider.UnitTestManager.GetElementById(project, id) as ContextSpecificationElement;
if (contextSpecification != null)
{
contextSpecification.Parent = context;
contextSpecification.State = UnitTestElementState.Valid;
return contextSpecification;
}
#endif
return new ContextSpecificationElement(provider,
context,
projectEnvoy,
declaringTypeName,
fieldName,
tags,
isIgnored);
}
示例7: BehaviorFactory
public BehaviorFactory(MSpecUnitTestProvider provider, IProject project, ProjectModelElementEnvoy projectEnvoy, ContextCache cache)
{
_provider = provider;
_cache = cache;
_project = project;
_projectEnvoy = projectEnvoy;
}
示例8: Element
protected Element(MSpecUnitTestProvider provider,
Element parent,
ProjectModelElementEnvoy projectEnvoy,
string declaringTypeName,
bool isIgnored)
{
if (projectEnvoy == null && !Shell.Instance.IsTestShell)
{
throw new ArgumentNullException("project");
}
if (declaringTypeName == null)
{
throw new ArgumentNullException("declaringTypeName");
}
if (projectEnvoy != null)
{
_projectEnvoy = projectEnvoy;
}
_provider = provider;
_declaringTypeName = declaringTypeName;
if (isIgnored)
{
ExplicitReason = "Ignored";
}
TypeName = declaringTypeName;
Parent = parent;
Children = new List<IUnitTestElement>();
State = UnitTestElementState.Valid;
}
示例9: GetOrCreateBehavior
public static BehaviorElement GetOrCreateBehavior(MSpecUnitTestProvider provider,
IProject project,
ProjectModelElementEnvoy projectEnvoy,
ContextElement context,
string declaringTypeName,
string fieldName,
bool isIgnored,
string fullyQualifiedTypeName)
{
#if RESHARPER_6
var id = BehaviorElement.CreateId(context, fieldName);
var behavior = provider.UnitTestManager.GetElementById(project, id) as BehaviorElement;
if (behavior != null)
{
behavior.Parent = context;
behavior.State = UnitTestElementState.Valid;
return behavior;
}
#endif
return new BehaviorElement(provider,
context,
projectEnvoy,
declaringTypeName,
fieldName,
isIgnored,
fullyQualifiedTypeName);
}
示例10: Element
protected Element(MSpecUnitTestProvider provider,
IPsi psiModuleManager,
ICache cacheManager,
Element parent,
ProjectModelElementEnvoy projectEnvoy,
IClrTypeName declaringTypeName,
bool isIgnored)
{
if (declaringTypeName == null)
{
throw new ArgumentNullException("declaringTypeName");
}
if (projectEnvoy != null)
{
this._projectEnvoy = projectEnvoy;
}
this._provider = provider;
this._declaringTypeName = declaringTypeName;
this._psiModuleManager = psiModuleManager;
this._cacheManager = cacheManager;
if (isIgnored)
{
this.ExplicitReason = "Ignored";
}
this.TypeName = declaringTypeName;
this.Parent = parent;
this.Children = new List<IUnitTestElement>();
this.State = UnitTestElementState.Valid;
this._taskFactory = new UnitTestTaskFactory(this._provider.ID);
}
示例11: BehaviorSpecificationFactory
public BehaviorSpecificationFactory(MSpecUnitTestProvider provider, IProject project, ProjectModelElementEnvoy projectEnvoy)
{
#endif
_provider = provider;
_project = project;
_projectEnvoy = projectEnvoy;
}
示例12: ContextSpecificationFactory
public ContextSpecificationFactory(MSpecUnitTestProvider provider, IProject project, ProjectModelElementEnvoy projectEnvoy, ContextCache cache)
{
#endif
_provider = provider;
_cache = cache;
_project = project;
_projectEnvoy = projectEnvoy;
}
示例13: Element
protected Element(KarmaServiceProvider serviceProvider, string name, ProjectModelElementEnvoy projectFileEnvoy, TextRange textRange)
{
ServiceProvider = serviceProvider;
ShortName = name;
ProjectFileEnvoy = projectFileEnvoy;
TextRange = textRange;
State = UnitTestElementState.Valid;
}
示例14: MetadataExplorer
public MetadataExplorer(IUnitTestProvider provider, ISolution solution, IProject project, UnitTestElementConsumer consumer)
{
testProvider = provider;
this.consumer = consumer;
this.project = project;
this.solution = solution;
projectModel = new ProjectModelElementEnvoy(this.project);
}
示例15: TestCaseElement
public TestCaseElement(TestProvider provider, BaseElement parent, ProjectModelElementEnvoy projectModelElementEnvoy,
string id, string name)
: base(provider, parent.TypeName, parent.AssemblyLocation, parent, id, projectModelElementEnvoy)
{
ShortName = name;
SetState(UnitTestElementState.Dynamic);
}