Esempio n. 1
0
        public static ExistsOptions Exists(this ProtoServer protoserver, string reason, bool shouldAbortOnError)
        {
            var proto = new ProtoExistsTask(new DotNetPath(), reason, shouldAbortOnError);

            protoserver.RegisterProtoTask(proto);
            return(proto);
        }
Esempio n. 2
0
        public static void Topshelf(this ProtoServer server, Action <TopshelfOptions> action)
        {
            var cfg = new TopshelfConfigurator(new DotNetPath());

            action(cfg);
            server.RegisterProtoTask(cfg);
        }
Esempio n. 3
0
        public static DsnOptions CreateDSN(this ProtoServer protoServer, string dsnName)
        {
            var proto = new ProtoDsnTask(dsnName);

            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Esempio n. 4
0
        public static XmlPokeOptions XmlPoke(this ProtoServer protoServer, string filePath)
        {
            var proto = new ProtoXmlPokeTask(filePath);

            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Esempio n. 5
0
        public static CommandLineOptions CommandLine(this ProtoServer protoServer, string command)
        {
            var proto = new ProtoCommandLineTask(command);

            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Esempio n. 6
0
        public static void Security(this ProtoServer server, Action <SecurityOptions> configureSecurity)
        {
            var so = new ProtoSecurityOptions(server);

            configureSecurity(so);
            //register is done inside of PSO
        }
Esempio n. 7
0
 public static IisOperations Iis7(this ProtoServer protoServer)
 {
     return(new IisOperations(protoServer)
     {
         Version = IisVersion.Seven
     });
 }
Esempio n. 8
0
        public static XmlPokeOptions XmlPoke(this ProtoServer protoServer, string filePath, IDictionary <string, string> namespacePrefixes)
        {
            var proto = new ProtoXmlPokeTask(filePath, namespacePrefixes);

            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Esempio n. 9
0
        public static RegistryKeyOptions CreateRegistryKey(this ProtoServer protoServer, RegistryHive hive, string name)
        {
            var proto = new ProtoCreateRegistryKeyTask(hive, name);

            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Esempio n. 10
0
        public static void NServiceBusHost(this ProtoServer server, Action <NServiceBusHostOptions> action)
        {
            var cfg = new NServiceBusHostConfigurator(new DotNetPath());

            action(cfg);
            server.RegisterProtoTask(cfg);
        }
Esempio n. 11
0
        public static RoundhousEOptions RoundhousE(this ProtoServer protoServer)
        {
            var proto = new RoundhousEProtoTask();

            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Esempio n. 12
0
        public static FolderShareOptions ShareFolder(this ProtoServer protoServer, string name)
        {
            var proto = new ProtoFolderShareTask(name);

            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Esempio n. 13
0
        public static FileCopyOptions CopyFile(this ProtoServer protoServer, string from)
        {
            var proto = new ProtoCopyFileTask(new DotNetPath(), from);

            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Esempio n. 14
0
        public static void SqlReports(this ProtoServer server, Action <ReportOptions> action)
        {
            var cxt = new ProtoSsrsTask();

            server.RegisterProtoTask(cxt);
            action(cxt);
        }
Esempio n. 15
0
        public static MsmqOptions Msmq(this ProtoServer protoServer)
        {
            var proto = new ProtoMsmqTask();

            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Esempio n. 16
0
        public static void RavenDb(this ProtoServer server, Action <RavenDbOptions> action)
        {
            var cfg = new RavenDbConfigurator(new DotNetPath());

            action(cfg);
            server.RegisterProtoTask(cfg);
        }
Esempio n. 17
0
        public static FilePokeOptions FilePoke(this ProtoServer protoServer, string filePath, Encoding encoding)
        {
            var proto = new ProtoFilePokeTask(filePath, encoding);

            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Esempio n. 18
0
        public static UnzipOptions UnzipArchive(this ProtoServer protoServer, string archiveFilename)
        {
            var proto = new ProtoUnzipArchiveTask(new DotNetPath(), archiveFilename);

            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Esempio n. 19
0
        public static RenameOptions RenameFile(this ProtoServer protoServer, string file)
        {
            var proto = new ProtoRenameTask(new DotNetPath(), file);

            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Esempio n. 20
0
        public static SqlOptions SqlInstance(this ProtoServer protoServer, string instanceName)
        {
            var proto = new ProtoMsSqlTask();

            proto.InstanceName = instanceName;
            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Esempio n. 21
0
        public static CopyOptions CopyDirectory(this ProtoServer protoServer, Action <FromOptions> a)
        {
            var proto = new ProtoCopyDirectoryTask(new DotNetPath());

            a(proto);
            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Esempio n. 22
0
        public static ProtoServer WithAuthentication(this ProtoServer server, string remoteUserName, string remotePassword)
        {
            var interpolator = new CaseInsensitiveInterpolator();

            remoteUserName = interpolator.ReplaceTokens(HUB.Settings, remoteUserName);
            remotePassword = interpolator.ReplaceTokens(HUB.Settings, remotePassword);
            WmiService.WithAuthentication(remoteUserName, remotePassword);
            return(server);
        }
Esempio n. 23
0
 private static void StartServer()
 {
     _server = new ProtoServer <string>(IPAddress.Any, 1024);
     Console.WriteLine("Starting Server...");
     _server.Start();
     Console.WriteLine("Server started!");
     _server.ClientConnected += ClientConnected;
     _server.ReceivedMessage += ServerMessageReceived;
 }
Esempio n. 24
0
        public static IisSiteOptions Iis7Site(this ProtoServer protoServer, string websiteName)
        {
            var task = new IisProtoTask(websiteName, new DotNetPath())
            {
                Version = IisVersion.Seven,
            };

            protoServer.RegisterProtoTask(task);
            return(task);
        }
Esempio n. 25
0
        public static RegistryKeyOptions CreateRegistryKey(this ProtoServer protoServer, RegistryHive hive, string name, Action <RegistryKeyOptions> options)
        {
            var proto = CreateRegistryKey(protoServer, hive, name);

            if (options != null)
            {
                options(proto);
            }
            return(proto);
        }
Esempio n. 26
0
 public Server()
 {
     _server = new ProtoServer <SalvoData>(IPAddress.Any, 51111)
     {
         ReceiveBufferSize = 1024 * 10,
         SendBufferSize    = 1024 * 10
     };
     _server.ClientConnected    += ClientConnected;
     _server.ClientDisconnected += _server_ClientDisconnected;
     _server.ReceivedMessage    += ServerMessageReceived;
 }
Esempio n. 27
0
        public static IisSiteOptions Iis7Site(this ProtoServer protoServer, string websiteName, string pathForWebsite, int port)
        {
            var task = new IisProtoTask(websiteName, new DotNetPath())
            {
                Version        = IisVersion.Seven,
                PathForWebsite = pathForWebsite,
                PortForWebsite = port
            };

            protoServer.RegisterProtoTask(task);
            return(task);
        }
Esempio n. 28
0
        public override void Context()
        {
            var mockProtoServer = new Mock<ProtoServer>();
            mockProtoServer.Setup(x => x.RegisterProtoTask(It.IsAny<ProtoTask>()))
                .Callback<ProtoTask>(t => _protoTask = t);
            var mockPhysServer = new Mock<PhysicalServer>();
            mockPhysServer.Setup(x => x.AddTask(It.IsAny<Iis7Task>()))
                .Callback<Task>(t => _iisTask = (Iis7Task)t);
            mockPhysServer.Setup(x => x.Name).Returns("localhost");

            _protoServer = mockProtoServer.Object;
            _physicalServer = mockPhysServer.Object;
        }
Esempio n. 29
0
 public IisOperations(ProtoServer protoServer)
 {
     _protoServer = protoServer;
 }
Esempio n. 30
0
        public static void Wait(this ProtoServer protoServer, TimeSpan span)
        {
            var proto = new WaitProtoTask(span);

            protoServer.RegisterProtoTask(proto);
        }
Esempio n. 31
0
        public static void Note(this ProtoServer protoServer, dropkick.DeploymentModel.DeploymentItemStatus status, string messageFormat, params object[] args)
        {
            var proto = new NoteProtoTask(status, messageFormat, args);

            protoServer.RegisterProtoTask(proto);
        }
 public CertificateSecurityConfiguration(ProtoServer server, string thumbprint)
 {
     _server = server;
     _thumbprint = thumbprint;
 }
Esempio n. 33
0
 public ProtoLocalPolicy(ProtoServer server)
 {
     _server = server;
 }
 public ProtoWinServiceTask(ProtoServer protoServer, string serviceName, bool errorOnFailure)
 {
     _protoServer = protoServer;
     _serviceName = serviceName;
     _errorOnFailure = errorOnFailure;
 }
Esempio n. 35
0
 public ProtoWinServiceTask(ProtoServer protoServer, string serviceName)
 {
     _protoServer = protoServer;
     _serviceName = serviceName;
 }
 public PathSecurityConfiguration(ProtoServer server, string path)
 {
     _server = server;
     _path = path;
 }
Esempio n. 37
0
 public ProtoNServiceBusTask(ProtoServer protoServer, string location)
 {
     this.protoServer = protoServer;
     this.location = location;
 }
 public MsSqlSecurityConfiguration(ProtoServer server, string database)
 {
     _server = server;
     _database = database;
 }
Esempio n. 39
0
 public static void Pause(this ProtoServer server, string messageToDisplay)
 {
     server.RegisterProtoTask(new PauseProtoTask(messageToDisplay));
 }
Esempio n. 40
0
 public ProtoSecurityOptions(ProtoServer server)
 {
     _server = server;
 }
 public QueueSecurityConfiguration(ProtoServer server, string queue)
 {
     _server = server;
     _queue = queue;
 }