Ejemplo 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);
        }
Ejemplo n.º 2
0
        public static void Topshelf(this ProtoServer server, Action <TopshelfOptions> action)
        {
            var cfg = new TopshelfConfigurator(new DotNetPath());

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

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

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

            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Ejemplo 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
        }
Ejemplo n.º 7
0
 public static IisOperations Iis7(this ProtoServer protoServer)
 {
     return(new IisOperations(protoServer)
     {
         Version = IisVersion.Seven
     });
 }
Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo n.º 10
0
        public static void NServiceBusHost(this ProtoServer server, Action <NServiceBusHostOptions> action)
        {
            var cfg = new NServiceBusHostConfigurator(new DotNetPath());

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

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

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

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

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

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

            action(cfg);
            server.RegisterProtoTask(cfg);
        }
Ejemplo 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);
        }
Ejemplo n.º 18
0
        public static UnzipOptions UnzipArchive(this ProtoServer protoServer, string archiveFilename)
        {
            var proto = new ProtoUnzipArchiveTask(new DotNetPath(), archiveFilename);

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

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

            proto.InstanceName = instanceName;
            protoServer.RegisterProtoTask(proto);
            return(proto);
        }
Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo 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;
 }
Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo 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;
 }
Ejemplo 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);
        }
Ejemplo 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;
        }
Ejemplo n.º 29
0
 public IisOperations(ProtoServer protoServer)
 {
     _protoServer = protoServer;
 }
Ejemplo n.º 30
0
        public static void Wait(this ProtoServer protoServer, TimeSpan span)
        {
            var proto = new WaitProtoTask(span);

            protoServer.RegisterProtoTask(proto);
        }
Ejemplo 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;
 }
Ejemplo n.º 33
0
 public ProtoLocalPolicy(ProtoServer server)
 {
     _server = server;
 }
Ejemplo n.º 34
0
 public ProtoWinServiceTask(ProtoServer protoServer, string serviceName, bool errorOnFailure)
 {
     _protoServer = protoServer;
     _serviceName = serviceName;
     _errorOnFailure = errorOnFailure;
 }
Ejemplo n.º 35
0
 public ProtoWinServiceTask(ProtoServer protoServer, string serviceName)
 {
     _protoServer = protoServer;
     _serviceName = serviceName;
 }
 public PathSecurityConfiguration(ProtoServer server, string path)
 {
     _server = server;
     _path = path;
 }
Ejemplo n.º 37
0
 public ProtoNServiceBusTask(ProtoServer protoServer, string location)
 {
     this.protoServer = protoServer;
     this.location = location;
 }
Ejemplo n.º 38
0
 public MsSqlSecurityConfiguration(ProtoServer server, string database)
 {
     _server = server;
     _database = database;
 }
Ejemplo n.º 39
0
 public static void Pause(this ProtoServer server, string messageToDisplay)
 {
     server.RegisterProtoTask(new PauseProtoTask(messageToDisplay));
 }
Ejemplo n.º 40
0
 public ProtoSecurityOptions(ProtoServer server)
 {
     _server = server;
 }
Ejemplo n.º 41
0
 public QueueSecurityConfiguration(ProtoServer server, string queue)
 {
     _server = server;
     _queue = queue;
 }