public IStitchAdaptor Create(PackageFile packageFile, StitchInstance stitchInstance)
        {
            var context = new CoreStitchContext(stitchInstance.Id);

            switch (packageFile.Adaptor.Type)
            {
            //case InstanceRunModeType.AppDomain:
            //    return new AppDomainAppAdaptor(instance, _network);
            case AdaptorType.ProcessV1:
                var pv1args = new ProcessV1Parameters(_configuration, _fileSystem, stitchInstance, packageFile.Adaptor.Parameters);
                return(new ProcessV1StitchAdaptor(_configuration, stitchInstance, context, pv1args));

            case AdaptorType.BuildInClassV1:
                return(new BuiltInClassV1StitchAdaptor(packageFile, stitchInstance, context));
            }

            throw new Exception("Run mode not supported");
        }
Example #2
0
        public ProcessV1StitchAdaptor(StitchesConfiguration configuration, StitchInstance stitchInstance, CoreStitchContext stitchContext, ProcessV1Parameters parameters)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }
            if (stitchInstance == null)
            {
                throw new ArgumentNullException(nameof(stitchInstance));
            }
            if (stitchContext == null)
            {
                throw new ArgumentNullException(nameof(stitchContext));
            }
            if (parameters == null)
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            _stitchInstance = stitchInstance;
            StitchContext   = stitchContext;
            _parameters     = parameters;
            _configuration  = configuration;
        }
 public BuiltInClassV1StitchAdaptor(PackageFile packageFile, StitchInstance stitchInstance, CoreStitchContext stitchContext)
 {
     StitchContext   = stitchContext;
     _stitchInstance = stitchInstance;
     _parameters     = new BuiltInClassV1Parameters(packageFile.Adaptor.Parameters);
 }
Example #4
0
 public bool Start(CoreStitchContext context)
 {
     _context = context;
     return(true);
 }