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

C# IOperationLock类代码示例

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

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



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

示例1: Tracer

 public Tracer(IFileSystem fileSystem, string path, TraceLevel level, IOperationLock traceLock)
 {
     _fileSystem = fileSystem;
     _path = path;
     _level = level;
     _traceLock = traceLock;
 }
开发者ID:richardprice,项目名称:kudu,代码行数:7,代码来源:Tracer.cs


示例2: 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


示例3: ReceivePackHandler

 public ReceivePackHandler(ITracer tracer,
                           IGitServer gitServer,
                           IOperationLock deploymentLock,
                           IDeploymentManager deploymentManager,
                           IDeploymentSettingsManager settings)
     : base(tracer, gitServer, deploymentLock, deploymentManager, settings)
 {
 }
开发者ID:lookworld,项目名称:kudu,代码行数:8,代码来源:ReceivePackHandler.cs


示例4: DeploymentController

 public DeploymentController(ITracer tracer,
                             IDeploymentManager deploymentManager,
                             IOperationLock deploymentLock)
 {
     _tracer = tracer;
     _deploymentManager = deploymentManager;
     _deploymentLock = deploymentLock;
 }
开发者ID:rguerreiro,项目名称:kudu,代码行数:8,代码来源:DeploymentController.cs


示例5: ReceivePackService

 public ReceivePackService(ITracer tracer,
                           IGitServer gitServer,
                           IOperationLock deploymentLock)
 {
     _gitServer = gitServer;
     _tracer = tracer;
     _deploymentLock = deploymentLock;
 }
开发者ID:randome,项目名称:kudu,代码行数:8,代码来源:ReceivePackService.cs


示例6: LiveScmEditorController

 public LiveScmEditorController(ITracer tracer,
                                IDeploymentManager deploymentManager,
                                IOperationLock operationLock,
                                IEnvironment environment,
                                IRepository repository) 
     : this(tracer, deploymentManager, operationLock, environment, repository, new FileSystem())
 {
 }
开发者ID:robzelt,项目名称:kudu,代码行数:8,代码来源:LiveScmEditorController.cs


示例7: DeploymentService

 public DeploymentService(ITracer tracer, 
                          IDeploymentManager deploymentManager, 
                          IOperationLock deploymentLock)
 {
     _tracer = tracer;
     _deploymentManager = deploymentManager;
     _deploymentLock = deploymentLock;
 }
开发者ID:cburgdorf,项目名称:kudu,代码行数:8,代码来源:DeploymentService.cs


示例8: RpcController

 public RpcController(ITracer tracer,
                   IGitServer gitServer,
                   IOperationLock deploymentLock)
 {
     _gitServer = gitServer;
     _tracer = tracer;
     _deploymentLock = deploymentLock;
 }
开发者ID:rguerreiro,项目名称:kudu,代码行数:8,代码来源:RpcController.cs


示例9: GitExeServer

 public GitExeServer(string path, IOperationLock initLock, ITraceFactory traceFactory)
 {
     _gitExe = new GitExecutable(path);
     _gitExe.SetTraceLevel(2);
     _traceFactory = traceFactory;
     _repository = new GitExeRepository(path, traceFactory);
     _repository.SetTraceLevel(2);
     _initLock = initLock;
 }
开发者ID:loudej,项目名称:kudu,代码行数:9,代码来源:GitExeServer.cs


示例10: DeploymentStatusManager

 public DeploymentStatusManager(IEnvironment environment,
                                IAnalytics analytics,
                                IOperationLock statusLock)
 {
     _environment = environment;
     _analytics = analytics;
     _statusLock = statusLock;
     _activeFile = Path.Combine(environment.DeploymentsPath, Constants.ActiveDeploymentFile);
 }
开发者ID:niknoxe,项目名称:kudu,代码行数:9,代码来源:DeploymentStatusManager.cs


示例11: ReceivePackHandler

 public ReceivePackHandler(ITracer tracer,
                           IGitServer gitServer,
                           IOperationLock deploymentLock,
                           IDeploymentManager deploymentManager,
                           IRepositoryFactory repositoryFactory)
     : base(tracer, gitServer, deploymentLock, deploymentManager)
 {
     _repositoryFactory = repositoryFactory;
 }
开发者ID:albertjan,项目名称:kudu,代码行数:9,代码来源:ReceivePackHandler.cs


示例12: DeploymentStatusManager

 public DeploymentStatusManager(IEnvironment environment,
                                IFileSystem fileSystem,
                                IOperationLock statusLock)
 {
     _environment = environment;
     _fileSystem = fileSystem;
     _statusLock = statusLock;
     _activeFile = Path.Combine(environment.DeploymentCachePath, Constants.ActiveDeploymentFile);
 }
开发者ID:ravenboilinux,项目名称:kudu,代码行数:9,代码来源:DeploymentStatusManager.cs


示例13: RpcService

 public RpcService(ITracer tracer,
                   IGitServer gitServer,
                   IDeploymentManagerFactory deploymentManagerFactory,
                   IOperationLock deploymentLock)
 {
     _gitServer = gitServer;
     _deploymentManagerFactory = deploymentManagerFactory;
     _tracer = tracer;
     _deploymentLock = deploymentLock;
 }
开发者ID:loudej,项目名称:kudu,代码行数:10,代码来源:RpcService.cs


示例14: DeploymentController

 public DeploymentController(ITracer tracer,
                             IDeploymentManager deploymentManager,
                             IOperationLock deploymentLock,
                             RepositoryFactory repositoryFactory)
 {
     _tracer = tracer;
     _deploymentManager = deploymentManager;
     _deploymentLock = deploymentLock;
     _repositoryFactory = repositoryFactory;
 }
开发者ID:lookworld,项目名称:kudu,代码行数:10,代码来源:DeploymentController.cs


示例15: LiveScmEditorController

 public LiveScmEditorController(ITracer tracer,
                                IOperationLock operationLock,
                                IEnvironment environment,
                                IRepository repository)
     : base(tracer, environment, environment.RepositoryPath)
 {
     _operationLock = operationLock;
     _repository = repository;
     _currentEtag = GetCurrentEtag();
 }
开发者ID:lookworld,项目名称:kudu,代码行数:10,代码来源:LiveScmEditorController.cs


示例16: GitServerHttpHandler

 protected GitServerHttpHandler(ITracer tracer, 
                             IGitServer gitServer, 
                             IOperationLock deploymentLock, 
                             IDeploymentManager deploymentManager)
 {
     GitServer = gitServer;
     Tracer = tracer;
     DeploymentLock = deploymentLock;
     DeploymentManager = deploymentManager;
 }
开发者ID:NorimaConsulting,项目名称:kudu,代码行数:10,代码来源:GitServerHttpHandler.cs


示例17: LiveScmEditorController

 public LiveScmEditorController(ITracer tracer,
                                IDeploymentManager deploymentManager,
                                IOperationLock operationLock,
                                IEnvironment environment,
                                IRepositoryFactory repositoryFactory)
     : base(tracer, environment, environment.RepositoryPath)
 {
     _deploymentManager = deploymentManager;
     _operationLock = operationLock;
     _repository = repositoryFactory.GetGitRepository();
 }
开发者ID:NorimaConsulting,项目名称:kudu,代码行数:11,代码来源:LiveScmEditorController.cs


示例18: FetchHandler

 public FetchHandler(ITracer tracer,
                     IGitServer gitServer,
                     IDeploymentManager deploymentManager,
                     IOperationLock deploymentLock,
                     RepositoryConfiguration configuration)
 {
     _gitServer = gitServer;
     _deploymentManager = deploymentManager;
     _tracer = tracer;
     _deploymentLock = deploymentLock;
     _configuration = configuration;
 }
开发者ID:vlad-c,项目名称:kudu,代码行数:12,代码来源:FetchHandler.cs


示例19: LiveScmController

 public LiveScmController(ITracer tracer,
                          IOperationLock deploymentLock,
                          IEnvironment environment,
                          IRepository repository,
                          IServerConfiguration serverConfiguration)
 {
     _tracer = tracer;
     _deploymentLock = deploymentLock;
     _environment = environment;
     _repository = repository;
     _serverConfiguration = serverConfiguration;
 }
开发者ID:ravenboilinux,项目名称:kudu,代码行数:12,代码来源:LiveScmController.cs


示例20: Create

        public static DeploymentStatusFile Create(string id, IFileSystem fileSystem, IEnvironment environment, IOperationLock statusLock)
        {
            string path = Path.Combine(environment.DeploymentsPath, id);

            FileSystemHelpers.EnsureDirectory(fileSystem, path);

            DateTime utcNow = DateTime.UtcNow;
            return new DeploymentStatusFile(id, environment, fileSystem, statusLock)
            {
                StartTime = utcNow,
                ReceivedTime = utcNow
            };
        }
开发者ID:hackmp,项目名称:kudu,代码行数:13,代码来源:DeploymentStatusFile.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IOperator类代码示例发布时间:2022-05-24
下一篇:
C# IOperationContext类代码示例发布时间: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