• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IEnvironment类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IEnvironment的典型用法代码示例。如果您正苦于以下问题:C# IEnvironment类的具体用法?C# IEnvironment怎么用?C# IEnvironment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IEnvironment类属于命名空间,在下文中一共展示了IEnvironment类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: SetHomePath

 public void SetHomePath(IEnvironment environment)
 {
     if (!String.IsNullOrEmpty(environment.RootPath))
     {
         SetHomePath(environment.RootPath);
     }
 }
开发者ID:hackmp,项目名称:kudu,代码行数:7,代码来源:Executable.cs


示例17: CClamp

 public static IQueryValue CClamp(IEnvironment env, IQueryValue[] args)
 {
     FunctionUtils.CheckArgumentCountEqual("cclamp", 1, args.Length);
     Color color = args[0].Color;
     color.Clamp();
     return new ColorValue() {Color = color};
 }
开发者ID:redxdev,项目名称:ImageQuery-CS,代码行数:7,代码来源:ImageMath.cs


示例18: OldRunsCleanup

        private static void OldRunsCleanup(string jobName, IFileSystem fileSystem, IEnvironment environment, ITraceFactory traceFactory, IDeploymentSettingsManager settings)
        {
            // if max is 5 and we have 5 we still want to remove one to make room for the next
            // that's why we decrement max value by 1
            int maxRuns = settings.GetMaxJobRunsHistoryCount() - 1;

            string historyPath = Path.Combine(environment.JobsDataPath, Constants.TriggeredPath, jobName);
            DirectoryInfoBase historyDirectory = fileSystem.DirectoryInfo.FromDirectoryName(historyPath);
            if (!historyDirectory.Exists)
            {
                return;
            }

            DirectoryInfoBase[] historyRunsDirectories = historyDirectory.GetDirectories();
            if (historyRunsDirectories.Length <= maxRuns)
            {
                return;
            }

            var directoriesToRemove = historyRunsDirectories.OrderByDescending(d => d.Name).Skip(maxRuns);
            foreach (DirectoryInfoBase directory in directoriesToRemove)
            {
                try
                {
                    directory.Delete(true);
                }
                catch (Exception ex)
                {
                    traceFactory.GetTracer().TraceError(ex);
                }
            }
        }
开发者ID:hackmp,项目名称:kudu,代码行数:32,代码来源:TriggeredJobRunLogger.cs


示例19: IsArray

        internal static IDynamic IsArray(IEnvironment environment, IArgs args)
        {
            // 15.4.3.2 Array.isArray ( arg )

            var arg = args[0] as IObject;
            return environment.CreateBoolean(arg != null && arg.Class == "Array");
        }
开发者ID:ChaosPandion,项目名称:Machete,代码行数:7,代码来源:CArray.cs


示例20: CreateIterator

 public override IDynamic CreateIterator(IEnvironment environment, IArgs args)
 {
     var scope = Scope.NewDeclarativeEnvironment();
     var generator = new Generator(new GeneratorSteps(Steps));
     var iterator = new HGeneratorIterator(environment, generator, VariableDeclarations, scope);
     return iterator;
 }
开发者ID:ChaosPandion,项目名称:Machete,代码行数:7,代码来源:HGeneratorIterable.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IEnvironmentInfo类代码示例发布时间:2022-05-24
下一篇:
C# IEnvelope类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap