コード例 #1
0
 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);
 }
コード例 #2
0
ファイル: SecretRepository.cs プロジェクト: aspenlaub/Pegh
    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);
        }
    }
コード例 #3
0
ファイル: WordDisguiser.cs プロジェクト: aspenlaub/Disguist
 public WordDisguiser(IDisguiser disguiser, ISecretRepository secretRepository)
 {
     vDisguiser        = disguiser;
     vSecretRepository = secretRepository;
 }