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

C# PhysicalServer类代码示例

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

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



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

示例1: RegisterRealTasks

 public override void RegisterRealTasks(PhysicalServer s)
 {
     s.AddTask(new RunSqlScriptTask(s.Name, _databaseName)
               {
                   ScriptToRun = ScriptToRun
               });
 }
开发者ID:GorelH,项目名称:dropkick,代码行数:7,代码来源:ProtoRunSqlScriptTask.cs


示例2: RegisterRealTasks

 public override void RegisterRealTasks(PhysicalServer server)
 {
     foreach (BaseProtoTask task in _innerTasks)
     {
         task.RegisterRealTasks(server);
     }
 }
开发者ID:GorelH,项目名称:dropkick,代码行数:7,代码来源:RavenDbConfigurator.cs


示例3: RegisterRealTasks

        public override void RegisterRealTasks(PhysicalServer site)
        {
            string filePath = site.MapPath(_filePath);

            var o = new XmlPokeTask(filePath, _items, new DotNetPath());
            site.AddTask(o);
        }
开发者ID:abusby,项目名称:dropkick,代码行数:7,代码来源:ProtoXmlPokeTask.cs


示例4: RegisterRealTasks

 public override void RegisterRealTasks(PhysicalServer server)
 {
     var to = server.MapPath(_to);
     var archiveFilename = _isLocal ? _archiveFilename : server.MapPath(_archiveFilename);
     var task = new UnzipArchiveTask(archiveFilename, to, _options, _path);
     server.AddTask(task);
 }
开发者ID:Allon-Guralnek,项目名称:dropkick,代码行数:7,代码来源:ProtoUnzipArchiveTask.cs


示例5: RemoteNServiceBusHostTask

        public RemoteNServiceBusHostTask(string exeName, string location, string instanceName, PhysicalServer site, string username, string password, string serviceName, string displayName, string description)
        {
            string args = string.IsNullOrEmpty(instanceName)
                            ? ""
                            : " /instance:\"{0}\"".FormatWith(instanceName);

            if (username != null && password != null)
            {
                var user = username;
                var pass = password;
                if (username.ShouldPrompt())
                    user = _prompt.Prompt("Win Service '{0}' UserName".FormatWith(exeName));
                if (shouldPromptForPassword(username, password))
                    pass = _prompt.Prompt("Win Service '{0}' For User '{1}' Password".FormatWith(exeName, username));

                args += " /userName:\"{0}\" /password:\"{1}\"".FormatWith(user, pass);
            }

            if (!string.IsNullOrEmpty(serviceName))
                args += " /serviceName:\"{0}\"".FormatWith(serviceName);

            if (!string.IsNullOrEmpty(displayName))
                args += " /displayName:\"{0}\"".FormatWith(displayName);

            if (!string.IsNullOrEmpty(description))
                args += " /description:\"{0}\"".FormatWith(description);

            _task = new RemoteCommandLineTask(exeName)
            {
                Args = "/install" + args,
                ExecutableIsLocatedAt = location,
                Machine = site.Name,
                WorkingDirectory = location
            };
        }
开发者ID:bertvan,项目名称:dropkick,代码行数:35,代码来源:RemoteNServiceBusHostTask.cs


示例6: RegisterRealTasks

 public override void RegisterRealTasks(PhysicalServer site)
 {
     var task = new PublishSsrsTask(_publishTo);
     task.AddReportsIn(_publishAllIn);
     task.AddReport(_publish);
     site.AddTask(task);
 }
开发者ID:GorelH,项目名称:dropkick,代码行数:7,代码来源:ProtoSsrsTask.cs


示例7: RemoteMsmqGrantReadWriteTask

 public RemoteMsmqGrantReadWriteTask(PhysicalServer server, string queueName, string group)
 {
     _server = server;
     _group = group;
     var ub = new UriBuilder("msmq", server.Name) { Path = queueName };
     _address = new QueueAddress(ub.Uri);
 }
开发者ID:GorelH,项目名称:dropkick,代码行数:7,代码来源:RemoteMsmqGrantReadWriteTask.cs


示例8: RegisterRealTasks

        public override void RegisterRealTasks(PhysicalServer site)
        {
            var ub = new UriBuilder("msmq", site.Name) { Path = _queue };
            var task = new MsmqGrantWriteTask(site, new QueueAddress(ub.Uri), _group);

            site.AddTask(task);
        }
开发者ID:GorelH,项目名称:dropkick,代码行数:7,代码来源:ProtoMsmqGrantWriteTask.cs


示例9: RemoteNServiceBusInstallTask

        public RemoteNServiceBusInstallTask(string exeName, string location, string instanceName, PhysicalServer site, string username, string password,
            string serviceName, string displayName, string description, bool startManually)
        {
            StringBuilder args = new StringBuilder("/install ");

            if (username != null && password != null)
            {
                var user = username;
                var pass = password;
                if (username.ShouldPrompt())
                    user = _prompt.Prompt("Win Service '{0}' UserName".FormatWith(exeName));
                if (password.ShouldPrompt())
                    pass = _prompt.Prompt("Win Service '{0}' For User '{1}' Password".FormatWith(exeName, username));

                args.Append(" /username:{0} /password:{1}".FormatWith(user, pass));
            }

            if (!string.IsNullOrEmpty(instanceName)) args.AppendFormat(" /instanceName:{0}", instanceName);
            if (!string.IsNullOrEmpty(serviceName)) args.AppendFormat(" /serviceName:{0}", serviceName);
            if (!string.IsNullOrEmpty(displayName)) args.AppendFormat(" /displayName:{0}", displayName);
            if (!string.IsNullOrEmpty(description)) args.AppendFormat(" /description:{0}", description);
            if (startManually) args.Append(" /startManually");

            _task = new RemoteCommandLineTask(exeName)
            {
                Args = args.ToString(),
                ExecutableIsLocatedAt = location,
                Machine = site.Name,
                WorkingDirectory = location
            };
        }
开发者ID:oriacle,项目名称:dropkick,代码行数:31,代码来源:RemoteNServiceBusInstallTask.cs


示例10: RegisterRealTasks

        public override void RegisterRealTasks(PhysicalServer site)
        {
            string to = site.MapPath(_to);

            var o = new CopyFileTask(_from, to, _newFileName, new DotNetPath());
            site.AddTask(o);
        }
开发者ID:GorelH,项目名称:dropkick,代码行数:7,代码来源:ProtoCopyFileTask.cs


示例11: CopyRemoteOut

        public CopyRemoteOut(PhysicalServer server)
        {
            _server = server;

            //copy remote out
            //TODO: make this path configurable
            var remotePath = RemotePathHelper.Convert(server, @"C:\Temp\dropkick.remote");
            if (!Directory.Exists(remotePath)) Directory.CreateDirectory(remotePath);
            _path = remotePath;

            var ewd = Assembly.GetExecutingAssembly().Location;
            var local = Path.GetDirectoryName(ewd);

            if (local == null) throw new Exception("shouldn't be null");

            var filesToCopy = new[] { "dropkick.remote.exe", "dropkick.dll", "log4net.dll", "Magnum.dll" };
            foreach (var file in filesToCopy)
            {
                var dest = Path.Combine(remotePath, file);
                var src = Path.Combine(local, file);
                _fineLog.DebugFormat("[msmq][remote] '{0}'->'{1}'", src, dest);

                try
                {
                    if(!File.Exists(dest))
                        File.Copy(src, dest, true);
                }
                catch (IOException ex)
                {
                    _fineLog.DebugFormat("[msmq][remote][file] Error copying '{0}' to '{1}'", file, remotePath);
                    throw;
                }

            }
        }
开发者ID:oriacle,项目名称:dropkick,代码行数:35,代码来源:CopyRemoteOut.cs


示例12: RemoteTopshelfTask

        public RemoteTopshelfTask(string exeName, string location, string instanceName, PhysicalServer site, string username, string password)
        {
            string args = string.IsNullOrEmpty(instanceName)
                              ? ""
                              : " /instance:" + instanceName;

            if (username != null && password != null)
            {
                var user = username;
                var pass = password;
                if (username.ShouldPrompt())
                    user = _prompt.Prompt("Win Service '{0}' UserName".FormatWith(exeName));
                if (password.ShouldPrompt())
                    pass = _prompt.Prompt("Win Service '{0}' For User '{1}' Password".FormatWith(exeName, username));

                args += " /username:{0} /password:{1}".FormatWith(user, pass);
            }

            _task = new RemoteCommandLineTask(exeName)
                        {
                            Args = "install" + args,
                            ExecutableIsLocatedAt = location,
                            Machine = site.Name,
                            WorkingDirectory = location
                        };
        }
开发者ID:GorelH,项目名称:dropkick,代码行数:26,代码来源:RemoteTopshelfTask.cs


示例13: FindCertificateBy

        public static X509Certificate2 FindCertificateBy(string thumbprint, StoreName storeName, StoreLocation storeLocation, PhysicalServer server, DeploymentResult result)
        {
            if (string.IsNullOrEmpty(thumbprint)) return null;

            var certstore = new X509Store(storeName, storeLocation);

            try
            {
                certstore.Open(OpenFlags.ReadOnly);

                thumbprint = thumbprint.Trim();
                thumbprint = thumbprint.Replace(" ", "");

                foreach (var cert in certstore.Certificates)
                {
                    if (string.Equals(cert.Thumbprint, thumbprint, StringComparison.OrdinalIgnoreCase) || string.Equals(cert.Thumbprint, thumbprint, StringComparison.InvariantCultureIgnoreCase))
                    {
                        return cert;
                    }
                }

                result.AddError("Could not find a certificate with thumbprint '{0}' on '{1}'".FormatWith(thumbprint, server.Name));
                return null;
            }
            finally
            {
                certstore.Close();
            }
        }
开发者ID:Allon-Guralnek,项目名称:dropkick,代码行数:29,代码来源:BaseSecurityCertificatePermissionsTask.cs


示例14: RegisterRealTasks

        public override void RegisterRealTasks(PhysicalServer site)
        {
            string filePath = site.MapPath(_filePath);

            var o = new XmlPokeTask(filePath, _items, _setOrInsertItems, _removeItems, new DotNetPath(), _namespacePrefixes);
            site.AddTask(o);
        }
开发者ID:Allon-Guralnek,项目名称:dropkick,代码行数:7,代码来源:ProtoXmlPokeTask.cs


示例15: RegisterRealTasks

        public override void RegisterRealTasks(PhysicalServer server)
        {
            var ub = new UriBuilder("msmq", server.Name) {Path = _queueName};

            if(server.IsLocal) server.AddTask(new CreateLocalMsmqQueueTask(server, new QueueAddress(ub.Uri), _queueOptions.transactional));
            else server.AddTask(new CreateRemoteMsmqQueueTask(server, new QueueAddress(ub.Uri), _queueOptions.transactional));
        }
开发者ID:GorelH,项目名称:dropkick,代码行数:7,代码来源:ProtoMsmqTask.cs


示例16: RegisterRealTasks

 public override void RegisterRealTasks(PhysicalServer s)
 {
     s.AddTask(new OutputSqlTask(s.Name, _databaseName)
               {
                   OutputSql = OutputSql
               });
 }
开发者ID:GorelH,项目名称:dropkick,代码行数:7,代码来源:ProtoOutputSqlTask.cs


示例17: RegisterRealTasks

        public override void RegisterRealTasks(PhysicalServer site)
        {
            var path = PathConverter.Convert(site, _path);

            var task = new ClearAclsTask(path, _groupsToPreserve, _groupsToRemove);
            site.AddTask(task);
        }
开发者ID:Allon-Guralnek,项目名称:dropkick,代码行数:7,代码来源:ProtoPathClearAclsTask.cs


示例18: RegisterRealTasks

        public override void RegisterRealTasks(PhysicalServer server)
        {
            string to = server.MapPath(_folderName);

            var task = new EmptyFolderTask(to, new DotNetPath());
            server.AddTask(task);
        }
开发者ID:GorelH,项目名称:dropkick,代码行数:7,代码来源:ProtoEmptyFolderTask.cs


示例19: RegisterRealTasks

 public override void RegisterRealTasks(PhysicalServer server)
 {
     var to = server.MapPath(_to);
      var archiveFilename = server.MapPath(_archiveFilename);
      var task = new UnzipArchiveTask(archiveFilename, to, _options, _path, _explicitExistingFileAction);
      server.AddTask(task);
 }
开发者ID:AkosLukacs,项目名称:dropkick,代码行数:7,代码来源:ProtoUnzipArchiveTask.cs


示例20: RemoteMsmqGrantAccessRightsTask

 public RemoteMsmqGrantAccessRightsTask(PhysicalServer server, QueueAddress address, string user, MessageQueueAccessRights accessRights)
 {
     _server = server;
     _address = address;
     _user = user;
     _accessRights = accessRights;
 }
开发者ID:rossbeehler,项目名称:dropkick,代码行数:7,代码来源:RemoteMsmqGrantAccessRightsTask.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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