本文整理汇总了C#中IEnvironment类的典型用法代码示例。如果您正苦于以下问题:C# IEnvironment类的具体用法?C# IEnvironment怎么用?C# IEnvironment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IEnvironment类属于命名空间,在下文中一共展示了IEnvironment类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DTECheckFrm
public DTECheckFrm(IEnvironment env)
{
_dteo = new DTEOperation(env, vsCE.Events.SolutionEventType.General);
InitializeComponent();
Icon = Resource.Package_32;
}
示例2: RepositoryFactory
public RepositoryFactory(IEnvironment environment, IDeploymentSettingsManager settings, ITraceFactory traceFactory, HttpContextBase httpContext)
{
_environment = environment;
_settings = settings;
_traceFactory = traceFactory;
_httpContext = httpContext;
}
示例3: MSBuildBuildEngine
public MSBuildBuildEngine(IFileSystem fileSystem, IEnvironment environment)
: base(fileSystem,environment)
{
Profile = new List<string> { environment.ExecutionEnvironment.Profile };
Platform = new List<string> { environment.ExecutionEnvironment.Platform };
Project = new List<string>();
}
示例4: InfoRefsService
public InfoRefsService(ITracer tracer, IGitServer gitServer, IEnvironment environment, RepositoryConfiguration configuration)
{
_gitServer = gitServer;
_tracer = tracer;
_deploymentTargetPath = environment.DeploymentTargetPath;
_configuration = configuration;
}
示例5: HGeneratorIterable
public HGeneratorIterable(IEnvironment environment, ReadOnlyList<GeneratorStep> steps, ReadOnlyList<string> variableDeclarations, ILexicalEnvironment scope)
: base(environment)
{
Steps = steps;
VariableDeclarations = variableDeclarations;
Scope = scope;
}
示例6: MyClassInitialize
public static void MyClassInitialize(TestContext testContext)
{
ObjectFactory.Inject<IEnvironment>(new Environment());
ObjectFactory.Inject<IDatabaseConnection>(new DatabaseConnection());
_environment = ObjectFactory.GetInstance<IEnvironment>();
}
示例7: GetAvatarPreselection
public static string GetAvatarPreselection(this Avatar avatar, IEnvironment env)
{
if (avatar.isDefault)
return "checked=\"checked\"";
return string.Empty;
}
示例8: AppVeyor
public AppVeyor(Logger logger, IEnvironment environment, IHttpClientFactory httpClientFactory)
{
_logger = logger;
_environment = environment;
_httpClientFactory = httpClientFactory;
_appVeyorApiUrl = _environment.GetEnvironmentVariable("APPVEYOR_API_URL");
}
示例9: CompositeEditorController
/// <summary>
/// Setup constructor
/// </summary>
public CompositeEditorController(
IEnvironment env,
ICompositeEditorView view,
object composite,
IComponentUiElementFactory uiFactory,
IComponentDependencies dependencies,
IComponentAggregator aggregator
)
: base(view)
{
Arguments.CheckNotNull( env, "env" );
Arguments.CheckNotNull( uiFactory, "uiFactory" );
Arguments.CheckNotNull( dependencies, "dependencies" );
Arguments.CheckNotNull( aggregator, "aggregator" );
m_View = view;
m_Environment = env;
m_UiFactory = uiFactory;
m_Dependencies = dependencies;
m_Aggregator = aggregator;
m_View.SelectionChanged += OnSelectionChanged;
m_View.EditComponent += OnEditComponent;
m_View.RemoveSelectedComponent += OnRemoveComponent;
m_View.AddToComponent += OnAddComponent;
ResetView( composite );
}
示例10: NullRepository
public NullRepository(IEnvironment environment, ITraceFactory traceFactory, HttpContextBase httpContext)
{
_environment = environment;
_traceFactory = traceFactory;
_httpContext = httpContext;
_changeSetKey = Path.Combine(_environment.RepositoryPath, "changeset");
}
示例11: CommandExports
public static IEnumerable<IGrouping<string, Exports.ICommand>> CommandExports(this IPackageManager manager, IEnvironment environment)
{
var projectCommands = manager.GetProjectExports<Exports.ICommand>(environment.Descriptor, environment.ProjectRepository, environment.ExecutionEnvironment).SelectMany(x=>x).GroupBy(x=>x.Package.Name);
var consumedPackages = projectCommands.Select(x => x.Key).ToList();
var systemCommands = manager.GetSystemExports<Exports.ICommand>(environment.SystemRepository, environment.ExecutionEnvironment).SelectMany(x => x).GroupBy(x => x.Package.Name);
return projectCommands.Concat(systemCommands.Where(x => consumedPackages.ContainsNoCase(x.Key) == false));
}
示例12: startTheEnvironment
private static void startTheEnvironment(IList<LogEntry> list, IEnvironment environment, params Action<IInstaller, IPackageLog>[] actions)
{
var log = new PackageLog();
try
{
var installers = environment.StartUp(log);
// This needs to happen regardless, but we want these logs put in before
// logs for the installers, so we don't do it in the finally{}
AddPackagingLogEntries(list);
executeInstallers(list, installers, actions);
}
catch (Exception ex)
{
AddPackagingLogEntries(list);
log.MarkFailure(ex.ToString());
}
finally
{
list.Add(LogEntry.FromPackageLog(environment, log));
environment.SafeDispose();
}
}
示例13: Open
public static DeploymentStatusFile Open(string id, IEnvironment environment, IAnalytics analytics, IOperationLock statusLock)
{
return statusLock.LockOperation(() =>
{
string path = Path.Combine(environment.DeploymentsPath, id, StatusFile);
if (!FileSystemHelpers.FileExists(path))
{
return null;
}
try
{
XDocument document = null;
using (var stream = FileSystemHelpers.OpenRead(path))
{
document = XDocument.Load(stream);
}
return new DeploymentStatusFile(id, environment, statusLock, document);
}
catch (Exception ex)
{
// in the scenario where w3wp is abruptly terminated while xml is being written,
// we may end up with corrupted xml. we will handle the error and remove the problematic directory.
analytics.UnexpectedException(ex);
FileSystemHelpers.DeleteDirectorySafe(Path.GetDirectoryName(path), ignoreErrors: true);
// it is ok to return null as callers already handle null.
return null;
}
}, DeploymentStatusManager.LockTimeout);
}
示例14: if
IHost IIsolator.Build(IEnvironment environment)
{
var domainName = _options.DomainName ?? Guid.NewGuid().ToString();
var strongName = typeof (Jail).Assembly.Evidence.GetHostEvidence<StrongName>();
var domain = System.AppDomain.CreateDomain(domainName, null, _options.Setup, _options.Permissions, strongName, typeof(object).Assembly.Evidence.GetHostEvidence<StrongName>());
var host = (AppDomainHost) Activator.CreateInstanceFrom(domain,
typeof (AppDomainHost).Assembly.CodeBase,
typeof (AppDomainHost).FullName)
.Unwrap();
host.AddAssembly(typeof (Jail).Assembly.GetName());
foreach (var registration in environment.GetRegistrations())
{
if (registration is AssemblyName)
{
host.AddAssembly((AssemblyName) registration);
}
else if (registration is InMemoryAssembly)
{
host.AddAssembly((InMemoryAssembly) registration);
}
}
return host;
}
示例15: AspNet5Builder
public AspNet5Builder(IEnvironment environment, IDeploymentSettingsManager settings, IBuildPropertyProvider propertyProvider, string sourcePath, string projectPath, bool isConsoleApp)
: base(environment, settings, propertyProvider, sourcePath)
{
_projectPath = projectPath;
_sourcePath = sourcePath;
_isConsoleApp = isConsoleApp;
}