public static ContainerBuilder UseForPeghTest(this ContainerBuilder builder, IDisguiser disguiser, ICsArgumentPrompter csArgumentPrompter) { RegisterDefaultTypes(builder); builder.RegisterType <SecretRepository>().As <ISecretRepository>(); builder.RegisterType <PeghEnvironment>().As <IPeghEnvironment>(); builder.RegisterInstance(disguiser).As <IDisguiser>(); builder.RegisterInstance(csArgumentPrompter).As <ICsArgumentPrompter>(); return(builder); }
public SecretRepository(ICsArgumentPrompter csArgumentPrompter, ICsLambdaCompiler csLambdaCompiler, IDisguiser disguiser, IPeghEnvironment peghEnvironment, IXmlDeserializer xmlDeserializer, IXmlSerializer xmlSerializer, IXmlSchemer xmlSchemer) { CsArgumentPrompter = csArgumentPrompter; CsLambdaCompiler = csLambdaCompiler; Disguiser = disguiser; PeghEnvironment = peghEnvironment; XmlDeserializer = xmlDeserializer; XmlSchemer = xmlSchemer; XmlSerializer = xmlSerializer; Values = new Dictionary <string, object>(); var folder = PeghEnvironment.RootWorkFolder + @"\SecretSamples\"; if (!Directory.Exists(folder)) { Directory.CreateDirectory(folder); } folder = PeghEnvironment.RootWorkFolder + @"\SecretRepository\"; if (!Directory.Exists(folder)) { Directory.CreateDirectory(folder); } }
public WordDisguiser(IDisguiser disguiser, ISecretRepository secretRepository) { vDisguiser = disguiser; vSecretRepository = secretRepository; }