当前位置: 首页>>代码示例>>C#>>正文


C# IEnvironment类代码示例

本文整理汇总了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;
        }
开发者ID:3F,项目名称:vsCommandEvent,代码行数:7,代码来源:DTECheckFrm.cs

示例2: RepositoryFactory

 public RepositoryFactory(IEnvironment environment, IDeploymentSettingsManager settings, ITraceFactory traceFactory, HttpContextBase httpContext)
 {
     _environment = environment;
     _settings = settings;
     _traceFactory = traceFactory;
     _httpContext = httpContext;
 }
开发者ID:sr457,项目名称:kudu,代码行数:7,代码来源:RepositoryFactory.cs

示例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>();
 }
开发者ID:seantfox,项目名称:openwrap,代码行数:7,代码来源:MSBuildBuildEngine.cs

示例4: InfoRefsService

 public InfoRefsService(ITracer tracer, IGitServer gitServer, IEnvironment environment, RepositoryConfiguration configuration)
 {
     _gitServer = gitServer;
     _tracer = tracer;
     _deploymentTargetPath = environment.DeploymentTargetPath;
     _configuration = configuration;
 }
开发者ID:loudej,项目名称:kudu,代码行数:7,代码来源:InfoRefsService.cs

示例5: HGeneratorIterable

 public HGeneratorIterable(IEnvironment environment, ReadOnlyList<GeneratorStep> steps, ReadOnlyList<string> variableDeclarations, ILexicalEnvironment scope)
     : base(environment)
 {
     Steps = steps;
     VariableDeclarations = variableDeclarations;
     Scope = scope;
 }
开发者ID:ChaosPandion,项目名称:Machete,代码行数:7,代码来源:HGeneratorIterable.cs

示例6: MyClassInitialize

        public static void MyClassInitialize(TestContext testContext)
        {
            ObjectFactory.Inject<IEnvironment>(new Environment());
            ObjectFactory.Inject<IDatabaseConnection>(new DatabaseConnection());

            _environment = ObjectFactory.GetInstance<IEnvironment>();
        }
开发者ID:peterbartels,项目名称:GenForm,代码行数:7,代码来源:EnvironmentServicesShould.cs

示例7: GetAvatarPreselection

        public static string GetAvatarPreselection(this Avatar avatar, IEnvironment env)
        {
            if (avatar.isDefault)
                return "checked=\"checked\"";

            return string.Empty;
        }
开发者ID:JAllard,项目名称:diva-distribution,代码行数:7,代码来源:ExtensionMethods.cs

示例8: AppVeyor

 public AppVeyor(Logger logger, IEnvironment environment, IHttpClientFactory httpClientFactory)
 {
     _logger = logger;
     _environment = environment;
     _httpClientFactory = httpClientFactory;
     _appVeyorApiUrl = _environment.GetEnvironmentVariable("APPVEYOR_API_URL");
 }
开发者ID:roh85,项目名称:vika,代码行数:7,代码来源:AppVeyor.cs

示例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 );
        }
开发者ID:johann-gambolputty,项目名称:robotbastards,代码行数:31,代码来源:CompositeEditorController.cs

示例10: NullRepository

 public NullRepository(IEnvironment environment, ITraceFactory traceFactory, HttpContextBase httpContext)
 {
     _environment = environment;
     _traceFactory = traceFactory;
     _httpContext = httpContext;
     _changeSetKey = Path.Combine(_environment.RepositoryPath, "changeset");
 }
开发者ID:sr457,项目名称:kudu,代码行数:7,代码来源:NullRepository.cs

示例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));
 }
开发者ID:AnthonySteele,项目名称:openwrap,代码行数:7,代码来源:EnvironmentExtensions.cs

示例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();
            }
        }
开发者ID:jericsmith,项目名称:bottles,代码行数:26,代码来源:EnvironmentRunner.cs

示例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);
        }
开发者ID:Walk4Muscle,项目名称:kudu,代码行数:34,代码来源:DeploymentStatusFile.cs

示例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;
        }
开发者ID:jailsfx,项目名称:jails,代码行数:28,代码来源:AppDomainIsolator.cs

示例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;
 }
开发者ID:kali786516,项目名称:kudu,代码行数:7,代码来源:AspNet5Builder.cs


注:本文中的IEnvironment类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。