public ProcessStitchAdaptor(CrossStitchCore core, StitchesConfiguration configuration, StitchInstance stitchInstance, IStitchEventObserver observer, ProcessParameters parameters, IModuleLog log)
        {
            Assert.ArgNotNull(core, nameof(core));
            Assert.ArgNotNull(configuration, nameof(configuration));
            Assert.ArgNotNull(stitchInstance, nameof(stitchInstance));
            Assert.ArgNotNull(observer, nameof(observer));
            Assert.ArgNotNull(parameters, nameof(parameters));
            Assert.ArgNotNull(log, nameof(log));

            _core           = core;
            _stitchInstance = stitchInstance;
            _observer       = observer;
            _parameters     = parameters;
            _log            = log;

            _channelFactory    = new CoreMessageChannelFactory(core.NodeId, stitchInstance.Id);
            _serializerFactory = new MessageSerializerFactory();
            _processFactory    = new ProcessFactory(stitchInstance, core, log);
            _stopRequested     = false;
        }
Example #2
0
        public string BuildCoreArgumentsString(StitchInstance stitchInstance, CrossStitchCore core, ProcessParameters parameters)
        {
            var sb = new StringBuilder();

            AddArgument(sb, Arguments.CoreId, core.NodeId);
            AddArgument(sb, Arguments.CorePid, core.CorePid.ToString());
            AddArgument(sb, Arguments.InstanceId, stitchInstance.Id);
            AddArgument(sb, Arguments.Application, stitchInstance.GroupName.Application);
            AddArgument(sb, Arguments.Component, stitchInstance.GroupName.Component);
            AddArgument(sb, Arguments.Version, stitchInstance.GroupName.Version);
            AddArgument(sb, Arguments.GroupName, stitchInstance.GroupName.ToString());
            AddArgument(sb, Arguments.DataDirectory, parameters.DataDirectory);
            AddArgument(sb, Arguments.ChannelType, parameters.ChannelType.ToString());
            AddArgument(sb, Arguments.Serializer, parameters.SerializerType.ToString());

            return(sb.ToString());
        }